summaryrefslogtreecommitdiff
path: root/zebra/redistribute.c
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2021-05-11 07:28:42 -0400
committerGitHub <noreply@github.com>2021-05-11 07:28:42 -0400
commit6099bb989dc97a199cb0c9ee95813a72a5550b1e (patch)
treec44da021633218d3b9e2b3cb724cbffafbbab85c /zebra/redistribute.c
parent41e4b0c0eeac29f947d3af71a8ac7a1479a7087c (diff)
parent6cc0114b6e070855022baa731f74ef78ee0a9c0f (diff)
Merge pull request #8650 from idryzhov/bgp-fix-redist
bgpd: fix redistribution in vrf
Diffstat (limited to 'zebra/redistribute.c')
-rw-r--r--zebra/redistribute.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/zebra/redistribute.c b/zebra/redistribute.c
index 7cb426359d..89f46f9c97 100644
--- a/zebra/redistribute.c
+++ b/zebra/redistribute.c
@@ -337,12 +337,17 @@ void zebra_redistribute_add(ZAPI_HANDLER_ARGS)
zvrf_id(zvrf), afi);
}
} else {
- 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 (!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);
+ }
}
stream_failure: