]> git.puffer.fish Git - matthieu/frr.git/commitdiff
The retry of BGP connection after expiry of connect retry timer was
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 20 May 2015 01:04:17 +0000 (18:04 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 20 May 2015 01:04:17 +0000 (18:04 -0700)
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

index 84710c05531c6fc6dcb7a1a62e74b0d101e9bf1a..c79d3b001a3054ab8be510506547b33fd3fceb59 100644 (file)
@@ -1351,14 +1351,11 @@ bgp_start (struct peer *peer)
 static int
 bgp_reconnect (struct peer *peer)
 {
-  int ret = 0;
-
-  if (bgp_stop (peer) > 0)
-    bgp_start (peer);
-  else
-    ret = -1;
+  if (bgp_stop (peer) < 0)
+    return -1;
 
-  return ret;
+  bgp_start (peer);
+  return 0;
 }
 
 static int