From fb98973a0c969e549739a3b19ff8f3f4618e99cb Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 19 May 2015 18:04:17 -0700 Subject: [PATCH] The retry of BGP connection after expiry of connect retry timer was broken by some earlier patches. Instead of staying in Connect state after reattempting the connection, the state used to go back to Idle and then try to connect. This patch fixes this error. --- bgpd/bgp_fsm.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c index 84710c0553..c79d3b001a 100644 --- a/bgpd/bgp_fsm.c +++ b/bgpd/bgp_fsm.c @@ -1351,14 +1351,11 @@ bgp_start (struct peer *peer) static int bgp_reconnect (struct peer *peer) { - int ret = 0; + if (bgp_stop (peer) < 0) + return -1; - if (bgp_stop (peer) > 0) - bgp_start (peer); - else - ret = -1; - - return ret; + bgp_start (peer); + return 0; } static int