From: David Lamparter Date: Thu, 22 Jan 2015 18:02:13 +0000 (+0100) Subject: zebra: identify MRIB on debug messages X-Git-Tag: frr-2.0-rc1~885 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=cb65349115a163c8cf8fa31ac3ce23bc4a3f69ca;p=mirror%2Ffrr.git zebra: identify MRIB on debug messages since the same code handles both URIB and MRIB, the debug messages can get rather confusing if the RIB isn't identified. Mark the MRIB in debug messages so we can distinguish that. Signed-off-by: David Lamparter --- diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 22785bf8f8..7c4df351f4 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -93,9 +93,12 @@ _rnode_zlog(const char *_func, vrf_id_t vrf_id, struct route_node *rn, int prior if (rn) { + rib_table_info_t *info = rn->table->info; + inet_ntop (rn->p.family, &rn->p.u.prefix, buf, INET6_ADDRSTRLEN); bptr = buf + strlen(buf); - snprintf(bptr, buf + sizeof(buf) - bptr, "/%d", rn->p.prefixlen); + snprintf(bptr, buf + sizeof(buf) - bptr, "/%d%s", rn->p.prefixlen, + info->safi == SAFI_MULTICAST ? " (MRIB)" : ""); } else {