]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: zclient provide interface info during reg_requests 4014/head
authorDon Slice <dslice@cumulusnetworks.com>
Mon, 25 Mar 2019 15:00:02 +0000 (15:00 +0000)
committerDon Slice <dslice@cumulusnetworks.com>
Mon, 25 Mar 2019 16:18:07 +0000 (16:18 +0000)
Problem found in bgpd where it wasn't learning interface address
information at startup due to the interface information becoming
available before the bgp instance was created. This issue was
caused by an earlier change that tried to make the interface
information discovery process more efficient but left this hole
for bgpd. For now, putting back in the previous method of
gathering interface info via the zclient_send_reg_requests call
and will revisit a more efficient way to get the info in the future.

Ticket: CM-23932
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
lib/zclient.c

index 55f2393c563b01867f31ee01d3a474feb651ba14..39a75710a425df1673dda0fe1386c2ed0baca09f 100644 (file)
@@ -414,6 +414,9 @@ void zclient_send_reg_requests(struct zclient *zclient, vrf_id_t vrf_id)
        /* We need router-id information. */
        zebra_message_send(zclient, ZEBRA_ROUTER_ID_ADD, vrf_id);
 
+       /* We need interface information. */
+       zebra_message_send(zclient, ZEBRA_INTERFACE_ADD, vrf_id);
+
        /* Set unwanted redistribute route. */
        for (afi = AFI_IP; afi < AFI_MAX; afi++)
                vrf_bitmap_set(zclient->redist[afi][zclient->redist_default],
@@ -478,6 +481,8 @@ void zclient_send_dereg_requests(struct zclient *zclient, vrf_id_t vrf_id)
        /* We need router-id information. */
        zebra_message_send(zclient, ZEBRA_ROUTER_ID_DELETE, vrf_id);
 
+       zebra_message_send(zclient, ZEBRA_INTERFACE_DELETE, vrf_id);
+
        /* Set unwanted redistribute route. */
        for (afi = AFI_IP; afi < AFI_MAX; afi++)
                vrf_bitmap_unset(zclient->redist[afi][zclient->redist_default],