mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 11:18:43 +00:00
zebra: additional redistribute related logging
Signed-off-by: Lou Berger <lberger@labn.net> Signed-off-by: David Lamparter <equinox@opensourcerouting.org> (cherry picked from commit 40278bd4c51939ccf8ec06ef1f33aedf8f05e86c)
This commit is contained in:
parent
953cde65c5
commit
169d94f7aa
@ -144,17 +144,22 @@ zebra_redistribute (struct zserv *client, int type, u_short instance, vrf_id_t v
|
|||||||
if (table)
|
if (table)
|
||||||
for (rn = route_top (table); rn; rn = route_next (rn))
|
for (rn = route_top (table); rn; rn = route_next (rn))
|
||||||
RNODE_FOREACH_RIB (rn, newrib)
|
RNODE_FOREACH_RIB (rn, newrib)
|
||||||
if (CHECK_FLAG (newrib->flags, ZEBRA_FLAG_SELECTED)
|
{
|
||||||
&& newrib->type == type
|
zlog_debug("%s: checking: selected=%d, type=%d, distance=%d, zebra_check_addr=%d",
|
||||||
&& newrib->instance == instance
|
__func__, CHECK_FLAG (newrib->flags, ZEBRA_FLAG_SELECTED),
|
||||||
&& newrib->distance != DISTANCE_INFINITY
|
newrib->type, newrib->distance, zebra_check_addr (&rn->p));
|
||||||
&& zebra_check_addr (&rn->p))
|
|
||||||
{
|
if (CHECK_FLAG (newrib->flags, ZEBRA_FLAG_SELECTED)
|
||||||
client->redist_v4_add_cnt++;
|
&& newrib->type == type
|
||||||
zsend_redistribute_route (ZEBRA_REDISTRIBUTE_IPV4_ADD, client, &rn->p, newrib);
|
&& newrib->instance == instance
|
||||||
}
|
&& newrib->distance != DISTANCE_INFINITY
|
||||||
|
&& zebra_check_addr (&rn->p))
|
||||||
#ifdef HAVE_IPV6
|
{
|
||||||
|
client->redist_v4_add_cnt++;
|
||||||
|
zsend_redistribute_route (ZEBRA_REDISTRIBUTE_IPV4_ADD, client, &rn->p, newrib);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id);
|
table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id);
|
||||||
if (table)
|
if (table)
|
||||||
for (rn = route_top (table); rn; rn = route_next (rn))
|
for (rn = route_top (table); rn; rn = route_next (rn))
|
||||||
@ -168,7 +173,6 @@ zebra_redistribute (struct zserv *client, int type, u_short instance, vrf_id_t v
|
|||||||
client->redist_v6_add_cnt++;
|
client->redist_v6_add_cnt++;
|
||||||
zsend_redistribute_route (ZEBRA_REDISTRIBUTE_IPV6_ADD, client, &rn->p, newrib);
|
zsend_redistribute_route (ZEBRA_REDISTRIBUTE_IPV6_ADD, client, &rn->p, newrib);
|
||||||
}
|
}
|
||||||
#endif /* HAVE_IPV6 */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Either advertise a route for redistribution to registered clients or */
|
/* Either advertise a route for redistribution to registered clients or */
|
||||||
|
Loading…
Reference in New Issue
Block a user