From b900ad16ee2571d33c29a9f8541a78ce1681cb5a Mon Sep 17 00:00:00 2001 From: Anuradha Karuppiah Date: Mon, 14 Oct 2019 12:41:33 -0700 Subject: [PATCH] pimd: logs to help debug leaked channel OIF problems Additional protocols were being set on the OIF proto-mask without logs. Added logs in that area. Also added start and end logs to ifchannel_delete to help identify state machine changes that play out as a part of this event handling. Ticket: CM-26732 Signed-off-by: Anuradha Karuppiah --- pimd/pim_ifchannel.c | 8 ++++++-- pimd/pim_oil.c | 17 +++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c index e23d3dc3da..c402ea8e7e 100644 --- a/pimd/pim_ifchannel.c +++ b/pimd/pim_ifchannel.c @@ -131,6 +131,10 @@ void pim_ifchannel_delete(struct pim_ifchannel *ch) pim_ifp = ch->interface->info; + if (PIM_DEBUG_PIM_TRACE) + zlog_debug("%s: ifchannel entry %s(%s) del start", __func__, + ch->sg_str, ch->interface->name); + if (PIM_I_am_DualActive(pim_ifp)) { if (PIM_DEBUG_MLAG) zlog_debug( @@ -621,8 +625,8 @@ struct pim_ifchannel *pim_ifchannel_add(struct interface *ifp, } if (PIM_DEBUG_PIM_TRACE) - zlog_debug("%s: ifchannel %s is created ", __func__, - ch->sg_str); + zlog_debug("%s: ifchannel %s(%s) is created ", __func__, + ch->sg_str, ch->interface->name); return ch; } diff --git a/pimd/pim_oil.c b/pimd/pim_oil.c index b165bcbee7..21febcc969 100644 --- a/pimd/pim_oil.c +++ b/pimd/pim_oil.c @@ -493,6 +493,23 @@ int pim_channel_add_oif(struct channel_oil *channel_oil, struct interface *oif, } } + if (PIM_DEBUG_MROUTE) { + char group_str[INET_ADDRSTRLEN]; + char source_str[INET_ADDRSTRLEN]; + pim_inet4_dump("", + channel_oil->oil.mfcc_mcastgrp, + group_str, sizeof(group_str)); + pim_inet4_dump("", + channel_oil->oil.mfcc_origin, source_str, + sizeof(source_str)); + zlog_debug( + "%s(%s): (S,G)=(%s,%s): proto_mask=%u OIF=%s vif_index=%d added to 0x%x", + __func__, caller, source_str, group_str, + proto_mask, oif->name, + pim_ifp->mroute_vif_index, + channel_oil + ->oif_flags[pim_ifp->mroute_vif_index]); + } return 0; } -- 2.39.5