mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 20:32:18 +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. */
|
/* 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;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
afi = family2afi(p->family);
|
afi = family2afi(p->family);
|
||||||
if (!afi) {
|
if (!afi) {
|
||||||
@ -310,13 +313,13 @@ void redistribute_delete(const struct prefix *p, const struct prefix *src_p,
|
|||||||
|
|
||||||
/* Send a delete for the 'old' re to any subscribed client. */
|
/* Send a delete for the 'old' re to any subscribed client. */
|
||||||
if (old_re
|
if (old_re
|
||||||
&& ((old_re->instance
|
&& (vrf_bitmap_check(client->redist[afi][ZEBRA_ROUTE_ALL],
|
||||||
|
old_re->vrf_id)
|
||||||
|
|| (old_re->instance
|
||||||
&& redist_check_instance(
|
&& redist_check_instance(
|
||||||
&client->mi_redist[afi]
|
&client->mi_redist[afi][old_re->type],
|
||||||
[old_re->type],
|
|
||||||
old_re->instance))
|
old_re->instance))
|
||||||
|| vrf_bitmap_check(
|
|| vrf_bitmap_check(client->redist[afi][old_re->type],
|
||||||
client->redist[afi][old_re->type],
|
|
||||||
old_re->vrf_id))) {
|
old_re->vrf_id))) {
|
||||||
zsend_redistribute_route(ZEBRA_REDISTRIBUTE_ROUTE_DEL,
|
zsend_redistribute_route(ZEBRA_REDISTRIBUTE_ROUTE_DEL,
|
||||||
client, p, src_p, old_re);
|
client, p, src_p, old_re);
|
||||||
|
Loading…
Reference in New Issue
Block a user