[quagga-dev,16314,3/5] bgpd: honor disable-connected-check option with next hop tracking

Message ID 20161019130235.26602-4-timo.teras@iki.fi
State Under Review
Headers show
Series
  • NHRP implementation
Related show

Commit Message

Timo Teräs Oct. 19, 2016, 1:02 p.m.
Make bgpd ignore connected state again if configured to do so.
---
 bgpd/bgp_fsm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c
index 2e07d93..7da63ea 100644
--- a/bgpd/bgp_fsm.c
+++ b/bgpd/bgp_fsm.c
@@ -716,7 +716,8 @@  bgp_start (struct peer *peer)
     }
 
   /* Register to be notified on peer up */
-  if ((peer->ttl == 1) || (peer->gtsm_hops == 1))
+  if ((peer->ttl == 1 || peer->gtsm_hops == 1) &&
+      ! CHECK_FLAG (peer->flags, PEER_FLAG_DISABLE_CONNECTED_CHECK))
     connected = 1;
 
   bgp_find_or_add_nexthop(family2afi(peer->su.sa.sa_family), NULL, peer,