From: Lou Berger Date: Tue, 12 Jan 2016 18:41:45 +0000 (-0500) Subject: zebra: additional redistribute related logging X-Git-Tag: frr-2.0-rc1~382 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=169d94f7aa2d882ed75280a223a6dbf3db0f8126;p=mirror%2Ffrr.git zebra: additional redistribute related logging Signed-off-by: Lou Berger Signed-off-by: David Lamparter (cherry picked from commit 40278bd4c51939ccf8ec06ef1f33aedf8f05e86c) --- diff --git a/zebra/redistribute.c b/zebra/redistribute.c index 1867362778..305fb4bc82 100644 --- a/zebra/redistribute.c +++ b/zebra/redistribute.c @@ -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 */