]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib/if: trivial, fix rarely used if debug function to print everything
authorPaul Jakma <paul@quagga.net>
Fri, 6 Jan 2012 16:07:39 +0000 (16:07 +0000)
committerPaul Jakma <paul@quagga.net>
Fri, 6 Jan 2012 16:19:36 +0000 (16:19 +0000)
* if.c: (if_dump) loop that doesn't do anything, wants to be
  before the zlog of what it's meant to print out so all the connected
  addresses get printed out. Trival: just a debug function

lib/if.c

index 31c60e3fe85f813066af459d4dc7785318043b32..1e99ffbca561a96d72f9d189f00e49e7618e05ad 100644 (file)
--- a/lib/if.c
+++ b/lib/if.c
@@ -426,16 +426,20 @@ if_flag_dump (unsigned long flag)
 static void
 if_dump (const struct interface *ifp)
 {
-  zlog_info ("Interface %s index %d metric %d mtu %d "
+  struct listnode *node;
+  struct connected *c;
+
+  for (ALL_LIST_ELEMENTS_RO (ifp->connected, node, c))
+    zlog_info ("Interface %s index %d metric %d mtu %d "
 #ifdef HAVE_IPV6
-             "mtu6 %d "
+               "mtu6 %d "
 #endif /* HAVE_IPV6 */
-             "%s",
-            ifp->name, ifp->ifindex, ifp->metric, ifp->mtu, 
+               "%s",
+               ifp->name, ifp->ifindex, ifp->metric, ifp->mtu, 
 #ifdef HAVE_IPV6
-            ifp->mtu6,
+               ifp->mtu6,
 #endif /* HAVE_IPV6 */
-            if_flag_dump (ifp->flags));
+               if_flag_dump (ifp->flags));
 }
 
 /* Interface printing for all interface. */