From: Donald Sharp Date: Mon, 17 Oct 2016 12:33:13 +0000 (-0400) Subject: pimd: Add interface to ifchannel debugs X-Git-Tag: frr-3.0-branchpoint~64^2~10^2~171 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=594a78cc8a9f1c4524e3a16fed0e14288e511027;p=mirror%2Ffrr.git pimd: Add interface to ifchannel debugs When outputting data about ifchannels due to debug include the interface this is happening on. Signed-off-by: Donald Sharp --- diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c index 1be7ebb4a9..0f7413c500 100644 --- a/pimd/pim_ifchannel.c +++ b/pimd/pim_ifchannel.c @@ -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)) diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c index 7f98f043da..b103a4fc66 100644 --- a/pimd/pim_upstream.c +++ b/pimd/pim_upstream.c @@ -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) {