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 <iryzhov@nfware.com>
This commit is contained in:
Igor Ryzhov 2021-05-18 23:31:52 +03:00
parent 4006e41baf
commit 6bfcd0f14a

View File

@ -2609,6 +2609,9 @@ static void bgp_zebra_connected(struct zclient *zclient)
zclient_num_connects++; /* increment even if not responding */ 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 /* 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 * we're only interested in the default VRF (others wouldn't have learnt
* the VRF from Zebra yet.) * the VRF from Zebra yet.)
@ -2619,9 +2622,6 @@ static void bgp_zebra_connected(struct zclient *zclient)
bgp_zebra_instance_register(bgp); 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 */ /* tell label pool that zebra is connected */
bgp_lp_event_zebra_up(); bgp_lp_event_zebra_up();