summaryrefslogtreecommitdiff
path: root/zebra/redistribute.c
diff options
context:
space:
mode:
authorAbhinay Ramesh <rabhinay@vmware.com>2021-04-01 05:17:54 +0000
committerAbhinay Ramesh <rabhinay@vmware.com>2021-04-07 06:09:42 +0000
commit6b2433c63f7fd3027cea8e06ca45f85bd3eea6f2 (patch)
tree70ff977d93826cb0c6edc0797b3f259f3078e8e5 /zebra/redistribute.c
parentb19c4f0829d9841858b146688207975c8f0d2d05 (diff)
bgpd: vrf route leaking, fix vrf redistribute
Description: After FRR restart, routes are not getting redistributed; when routes added first and then 'redistribute static' cmd is issued. During the frr restart, vrf_id will be unknown, so irrespective of redistribution, we set the redistribute vrf bitmap. Later, when we add a route and then issue 'redistribute' cmd, we check the redistribute vrf bitmap and return CMD_WARNING; zebra_redistribute_add also checks the redistribute vrf bitmap and returns. Instead of checking the redistribute vrf bitmap, always set it anyways. Co-authored-by: Santosh P K <sapk@vmware.com> Co-authored-by: Kantesh Mundaragi <kmundaragi@vmware.com> Signed-off-by: Abhinay Ramesh <rabhinay@vmware.com>
Diffstat (limited to 'zebra/redistribute.c')
-rw-r--r--zebra/redistribute.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/zebra/redistribute.c b/zebra/redistribute.c
index 9e675011ee..104f952b3b 100644
--- a/zebra/redistribute.c
+++ b/zebra/redistribute.c
@@ -347,17 +347,12 @@ void zebra_redistribute_add(ZAPI_HANDLER_ARGS)
zvrf_id(zvrf), afi);
}
} else {
- if (!vrf_bitmap_check(client->redist[afi][type],
- zvrf_id(zvrf))) {
- if (IS_ZEBRA_DEBUG_EVENT)
- zlog_debug(
- "%s: setting vrf %s(%u) redist bitmap",
- __func__, VRF_LOGNAME(zvrf->vrf),
- zvrf_id(zvrf));
- vrf_bitmap_set(client->redist[afi][type],
- zvrf_id(zvrf));
- zebra_redistribute(client, type, 0, zvrf_id(zvrf), afi);
- }
+ if (IS_ZEBRA_DEBUG_EVENT)
+ zlog_debug("%s: setting vrf %s(%u) redist bitmap",
+ __func__, VRF_LOGNAME(zvrf->vrf),
+ zvrf_id(zvrf));
+ vrf_bitmap_set(client->redist[afi][type], zvrf_id(zvrf));
+ zebra_redistribute(client, type, 0, zvrf_id(zvrf), afi);
}
stream_failure: