mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 06:14:35 +00:00
zebra: fix redistribution of default routes
We were always redistributing the default routes (IPv[46]) in redistribute_update() because the 'client->redist_default' condition always returns true. The 'redist_default' member of the 'zserv' structure is a pointer and is always initialized with vrf_bitmap_init() in the zebra_client_create() function. To fix this, use vrf_bitmap_check() instead. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
This commit is contained in:
parent
a695cc7b80
commit
83c6557494
@ -201,7 +201,7 @@ redistribute_update (struct prefix *p, struct rib *rib, struct rib *prev_rib)
|
||||
{
|
||||
send_redistribute = 0;
|
||||
|
||||
if (is_default(p) && client->redist_default)
|
||||
if (is_default (p) && vrf_bitmap_check (client->redist_default, rib->vrf_id))
|
||||
send_redistribute = 1;
|
||||
|
||||
if (vrf_bitmap_check (client->redist[afi][ZEBRA_ROUTE_ALL], rib->vrf_id))
|
||||
@ -210,10 +210,7 @@ redistribute_update (struct prefix *p, struct rib *rib, struct rib *prev_rib)
|
||||
if (rib->instance && redist_check_instance(&client->mi_redist[afi][rib->type],
|
||||
rib->instance))
|
||||
send_redistribute = 1;
|
||||
else
|
||||
if ((is_default (p) &&
|
||||
vrf_bitmap_check (client->redist_default, rib->vrf_id))
|
||||
|| vrf_bitmap_check (client->redist[afi][rib->type], rib->vrf_id))
|
||||
else if (vrf_bitmap_check (client->redist[afi][rib->type], rib->vrf_id))
|
||||
send_redistribute = 1;
|
||||
|
||||
if (send_redistribute)
|
||||
|
Loading…
Reference in New Issue
Block a user