mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 13:27:53 +00:00
zebra: Fix redistribution deletion for ZEBRA_ROUTE_ALL
commit ee8a72f315
broke the usage of ZEBRA_ROUTE_ALL as a valid redistribution
command. This commit puts it back in. LDP uses ZEBRA_ROUTE_ALL
as an option to say it is interested in all REDISTRIBUTION events.
Fixes: #5072
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
67a9eda9ee
commit
0e965c6781
@ -263,8 +263,11 @@ void redistribute_delete(const struct prefix *p, const struct prefix *src_p,
|
||||
}
|
||||
|
||||
/* Add DISTANCE_INFINITY check. */
|
||||
if (old_re && (old_re->distance == DISTANCE_INFINITY))
|
||||
if (old_re && (old_re->distance == DISTANCE_INFINITY)) {
|
||||
if (IS_ZEBRA_DEBUG_RIB)
|
||||
zlog_debug("\tSkipping due to Infinite Distance");
|
||||
return;
|
||||
}
|
||||
|
||||
afi = family2afi(p->family);
|
||||
if (!afi) {
|
||||
@ -310,14 +313,14 @@ void redistribute_delete(const struct prefix *p, const struct prefix *src_p,
|
||||
|
||||
/* Send a delete for the 'old' re to any subscribed client. */
|
||||
if (old_re
|
||||
&& ((old_re->instance
|
||||
&& redist_check_instance(
|
||||
&client->mi_redist[afi]
|
||||
[old_re->type],
|
||||
old_re->instance))
|
||||
|| vrf_bitmap_check(
|
||||
client->redist[afi][old_re->type],
|
||||
old_re->vrf_id))) {
|
||||
&& (vrf_bitmap_check(client->redist[afi][ZEBRA_ROUTE_ALL],
|
||||
old_re->vrf_id)
|
||||
|| (old_re->instance
|
||||
&& redist_check_instance(
|
||||
&client->mi_redist[afi][old_re->type],
|
||||
old_re->instance))
|
||||
|| vrf_bitmap_check(client->redist[afi][old_re->type],
|
||||
old_re->vrf_id))) {
|
||||
zsend_redistribute_route(ZEBRA_REDISTRIBUTE_ROUTE_DEL,
|
||||
client, p, src_p, old_re);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user