summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_zebra.c
diff options
context:
space:
mode:
authorDon Slice <dslice@cumulusnetworks.com>2019-03-14 16:17:47 +0100
committerDon Slice <dslice@cumulusnetworks.com>2019-03-14 16:17:47 +0100
commit401d56cc5238173ba24bf8460821710bd745ca9e (patch)
treee2541faffd95013f39f125f76c4f2ce236d20828 /bgpd/bgp_zebra.c
parentbgpd: move bgp_update_redist_vrf_bitmaps to bgp_zebra.c for wider use beyond ... (diff)
downloadfrr-401d56cc5238173ba24bf8460821710bd745ca9e.tar.xz
frr-401d56cc5238173ba24bf8460821710bd745ca9e.zip
bgpd: fix redistribution into vrf when networking is restarted
Found that previous fix for this issue caused collatoral damage and reverted that fix. This fix clears the vrf_bitmaps when the vrf is disabled/deleted and then re-applies the redist config when the vrf is re-enabled. Ticket: CM-24231 Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_zebra.c')
-rw-r--r--bgpd/bgp_zebra.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index ca25a1d4c..d9749863e 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -1843,9 +1843,9 @@ void bgp_redistribute_redo(struct bgp *bgp)
}
}
-/* Update redistribute vrf bitmap during triggers like
- restart networking or delete/add VRFs */
-void bgp_update_redist_vrf_bitmaps(struct bgp *bgp, vrf_id_t old_vrf_id)
+/* Unset redistribute vrf bitmap during triggers like
+ restart networking or delete VRFs */
+void bgp_unset_redist_vrf_bitmaps(struct bgp *bgp, vrf_id_t old_vrf_id)
{
int i;
afi_t afi;
@@ -1853,12 +1853,9 @@ void bgp_update_redist_vrf_bitmaps(struct bgp *bgp, vrf_id_t old_vrf_id)
for (afi = AFI_IP; afi < AFI_MAX; afi++)
for (i = 0; i < ZEBRA_ROUTE_MAX; i++)
if (vrf_bitmap_check(zclient->redist[afi][i],
- old_vrf_id)) {
+ old_vrf_id))
vrf_bitmap_unset(zclient->redist[afi][i],
old_vrf_id);
- vrf_bitmap_set(zclient->redist[afi][i],
- bgp->vrf_id);
- }
return;
}