]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Add interface to ifchannel debugs
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 17 Oct 2016 12:33:13 +0000 (08:33 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 22 Dec 2016 01:26:11 +0000 (20:26 -0500)
When outputting data about ifchannels due to debug
include the interface this is happening on.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/pim_ifchannel.c
pimd/pim_upstream.c

index 1be7ebb4a996c812c65c4c4d3971f1fdc8013a6e..0f7413c500f0343cbb1c62d2a896e1bac7f6c8d4 100644 (file)
@@ -159,7 +159,8 @@ void pim_ifchannel_ifjoin_switch(const char *caller,
   enum pim_ifjoin_state old_state = ch->ifjoin_state;
 
   if (PIM_DEBUG_PIM_EVENTS)
-    zlog_debug ("PIM_IFCHANNEL: %s is switching from %s to %s",
+    zlog_debug ("PIM_IFCHANNEL(%s): %s is switching from %s to %s",
+               ch->interface->name,
                pim_str_sg_dump (&ch->sg),
                pim_ifchannel_ifjoin_name (ch->ifjoin_state),
                pim_ifchannel_ifjoin_name (new_state));
@@ -776,9 +777,9 @@ void pim_ifchannel_local_membership_add(struct interface *ifp,
                  char buff[100];
 
                  strcpy (buff, pim_str_sg_dump (&up->sg));
-                 zlog_debug("%s %s: IGMP (S,G)=%s from %s",
+                 zlog_debug("%s %s: IGMP (S,G)=%s(%s) from %s",
                             __FILE__, __PRETTY_FUNCTION__,
-                            buff, pim_str_sg_dump (sg));
+                            buff, ifp->name, pim_str_sg_dump (sg));
                }
 
               if (pim_upstream_evaluate_join_desired (child))
@@ -828,9 +829,9 @@ void pim_ifchannel_local_membership_del(struct interface *ifp,
                {
                  char buff[100];
                  strcpy (buff, pim_str_sg_dump (&up->sg));
-                 zlog_debug("%s %s: Prune(S,G)=%s from %s",
+                 zlog_debug("%s %s: Prune(S,G)=%s(%s) from %s",
                             __FILE__, __PRETTY_FUNCTION__,
-                            buff, pim_str_sg_dump (&child->sg));
+                            buff, ifp->name, pim_str_sg_dump (&child->sg));
                }
 
              if (!pim_upstream_evaluate_join_desired (child))
index 7f98f043daa5fec4164c64469479a04fe193b931..b103a4fc66213f15f948c78245acc915cf97f7e7 100644 (file)
@@ -158,6 +158,10 @@ static void upstream_channel_oil_detach(struct pim_upstream *up)
 
 void pim_upstream_delete(struct pim_upstream *up)
 {
+  if (PIM_DEBUG_PIM_TRACE)
+    zlog_debug ("%s: %s is being deleted",
+               __PRETTY_FUNCTION__,
+               pim_str_sg_dump (&up->sg));
   THREAD_OFF(up->t_join_timer);
   THREAD_OFF(up->t_ka_timer);
   THREAD_OFF(up->t_rs_timer);
@@ -546,7 +550,7 @@ struct pim_upstream *pim_upstream_add(struct prefix_sg *sg,
                                      struct interface *incoming,
                                      int flags)
 {
-  struct pim_upstream *up;
+  struct pim_upstream *up = NULL;
 
   up = pim_upstream_find(sg);
   if (up) {