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:
Lou Berger 2016-01-12 13:41:45 -05:00 committed by Donald Sharp
parent 953cde65c5
commit 169d94f7aa

View File

@ -144,17 +144,22 @@ zebra_redistribute (struct zserv *client, int type, u_short instance, vrf_id_t v
if (table)
for (rn = route_top (table); rn; rn = route_next (rn))
RNODE_FOREACH_RIB (rn, newrib)
if (CHECK_FLAG (newrib->flags, ZEBRA_FLAG_SELECTED)
&& newrib->type == type
&& newrib->instance == instance
&& newrib->distance != DISTANCE_INFINITY
&& zebra_check_addr (&rn->p))
{
client->redist_v4_add_cnt++;
zsend_redistribute_route (ZEBRA_REDISTRIBUTE_IPV4_ADD, client, &rn->p, newrib);
}
#ifdef HAVE_IPV6
{
zlog_debug("%s: checking: selected=%d, type=%d, distance=%d, zebra_check_addr=%d",
__func__, CHECK_FLAG (newrib->flags, ZEBRA_FLAG_SELECTED),
newrib->type, newrib->distance, zebra_check_addr (&rn->p));
if (CHECK_FLAG (newrib->flags, ZEBRA_FLAG_SELECTED)
&& newrib->type == type
&& newrib->instance == instance
&& newrib->distance != DISTANCE_INFINITY
&& zebra_check_addr (&rn->p))
{
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);
if (table)
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++;
zsend_redistribute_route (ZEBRA_REDISTRIBUTE_IPV6_ADD, client, &rn->p, newrib);
}
#endif /* HAVE_IPV6 */
}
/* Either advertise a route for redistribution to registered clients or */