summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Jakma <paul.jakma@sun.com>2008-09-09 17:14:33 +0100
committerPaul Jakma <paul@quagga.net>2008-09-09 17:14:33 +0100
commit6e1992638864c3847d35bf9442989bce4c81de13 (patch)
tree78ef25d50da4dbaf4aa219240852366d9ce9c176
parent2b2fc5606f035eabd322b3a6aad4349efb9ab542 (diff)
[bgpd] Allow accepted peers to progress even if realpeer is in Connect
* bgpd/bgp_packet.c: (bgp_open_receive) Try fix the little race in the FSM, where a accept-peer that progress faster than realpeer gets closed down if realpeer is still just in Connect, by allowing the realpeer to be bgp_stop'ed and doing the regular swapping-of-FSM state.
-rw-r--r--bgpd/bgp_packet.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c
index 271a21a0..1422bad6 100644
--- a/bgpd/bgp_packet.c
+++ b/bgpd/bgp_packet.c
@@ -1304,8 +1304,8 @@ bgp_open_receive (struct peer *peer, bgp_size_t size)
}
else if (ret == 0 && realpeer->status != Active
&& realpeer->status != OpenSent
- && realpeer->status != OpenConfirm)
-
+ && realpeer->status != OpenConfirm
+ && realpeer->status != Connect)
{
/* XXX: This is an awful problem..
*
@@ -1363,8 +1363,9 @@ bgp_open_receive (struct peer *peer, bgp_size_t size)
}
if (BGP_DEBUG (events, EVENTS))
- zlog_debug ("%s [Event] Transfer temporary BGP peer to existing one",
- peer->host);
+ zlog_debug ("%s [Event] Transfer accept BGP peer to real (state %s)",
+ peer->host,
+ LOOKUP (bgp_status_msg, realpeer->status));
bgp_stop (realpeer);