From: Igor Ryzhov Date: Tue, 18 May 2021 20:31:52 +0000 (+0300) Subject: bgpd: fix zebra bfd registration X-Git-Tag: frr-8.0~21^2~25 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=aa5c758b06acbd2179b7b6232b6a9f64c250b22c;p=matthieu%2Ffrr.git bgpd: fix zebra bfd registration 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 --- diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 63214c5676..2bf57130be 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -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();