From f62abc7d6577a44a67111b25a70d40170e2790af Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Tue, 30 Jan 2018 15:30:10 +0100 Subject: [PATCH] bgpd: do not start BGP VRF peer connection, if VRF not unknown Upon starting a BGP VRF instance, the server socket is not created, because the VRF ID is not known, and then underlying VRF backend is not ready yet. Because of that, the peer connection attempt will not be started before. Signed-off-by: Philippe Guibert --- bgpd/bgp_fsm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c index 79f4b1c91a..de11a98a20 100644 --- a/bgpd/bgp_fsm.c +++ b/bgpd/bgp_fsm.c @@ -289,7 +289,8 @@ void bgp_timer_set(struct peer *peer) /* First entry point of peer's finite state machine. In Idle status start timer is on unless peer is shutdown or peer is inactive. All other timer must be turned off */ - if (BGP_PEER_START_SUPPRESSED(peer) || !peer_active(peer)) { + if (BGP_PEER_START_SUPPRESSED(peer) || !peer_active(peer) + || peer->bgp->vrf_id == VRF_UNKNOWN) { BGP_TIMER_OFF(peer->t_start); } else { BGP_TIMER_ON(peer->t_start, bgp_start_timer,