]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: fix zebra bfd registration
authorIgor Ryzhov <iryzhov@nfware.com>
Tue, 18 May 2021 20:31:52 +0000 (23:31 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Thu, 27 May 2021 10:18:42 +0000 (13:18 +0300)
If there's no default router configured at the moment when bgpd is
connected to zebra, bgpd is not registered as a BFD client.

We should do the registration regardless of the config existence.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
bgpd/bgp_zebra.c

index 63214c5676f08b20aad3473e185ab7a690f72b3e..2bf57130beab05e0012a561a4302cc08f6992594 100644 (file)
@@ -2609,6 +2609,9 @@ static void bgp_zebra_connected(struct zclient *zclient)
 
        zclient_num_connects++; /* increment even if not responding */
 
+       /* Send the client registration */
+       bfd_client_sendmsg(zclient, ZEBRA_BFD_CLIENT_REGISTER, VRF_DEFAULT);
+
        /* At this point, we may or may not have BGP instances configured, but
         * we're only interested in the default VRF (others wouldn't have learnt
         * the VRF from Zebra yet.)
@@ -2619,9 +2622,6 @@ static void bgp_zebra_connected(struct zclient *zclient)
 
        bgp_zebra_instance_register(bgp);
 
-       /* Send the client registration */
-       bfd_client_sendmsg(zclient, ZEBRA_BFD_CLIENT_REGISTER, bgp->vrf_id);
-
        /* tell label pool that zebra is connected */
        bgp_lp_event_zebra_up();