[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.
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c
index 271a21a..1422bad 100644
--- a/bgpd/bgp_packet.c
+++ b/bgpd/bgp_packet.c
@@ -1304,8 +1304,8 @@
}
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 @@
}
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);