]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: do not start BGP VRF peer connection, if VRF not unknown
authorPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 30 Jan 2018 14:30:10 +0000 (15:30 +0100)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 27 Feb 2018 10:11:24 +0000 (11:11 +0100)
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 <philippe.guibert@6wind.com>
bgpd/bgp_fsm.c

index 79f4b1c91a93f4c203f150ec3a46534dc0705f84..de11a98a204fb3818419e88298801aacada12f95 100644 (file)
@@ -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,