]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: identify MRIB on debug messages
authorDavid Lamparter <equinox@opensourcerouting.org>
Thu, 22 Jan 2015 18:02:13 +0000 (19:02 +0100)
committerDonald Sharp <sharpd@cumulusnetwroks.com>
Thu, 26 May 2016 00:38:31 +0000 (20:38 -0400)
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 <equinox@opensourcerouting.org>
zebra/zebra_rib.c

index 22785bf8f8e3b577b32d496ae2e2bd16392c1d81..7c4df351f4cec52ba8fae9b10d41b1991848cfa5 100644 (file)
@@ -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
     {