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 <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2016-10-17 08:33:13 -04:00
parent bebc7290cd
commit 594a78cc8a
2 changed files with 11 additions and 6 deletions

View 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))

View 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) {