summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLou Berger <lberger@labn.net>2016-01-12 13:41:45 -0500
committerDonald Sharp <sharpd@cumulusnetwroks.com>2016-08-18 07:57:40 -0400
commit169d94f7aa2d882ed75280a223a6dbf3db0f8126 (patch)
tree98f4f97a3a7b0b80886e561b1315223b998d9cd0
parent953cde65c5a35c8762f5858ace216b768814d01c (diff)
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)
-rw-r--r--zebra/redistribute.c28
1 files changed, 16 insertions, 12 deletions
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 */