summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2023-09-18 11:40:48 +0300
committerGitHub <noreply@github.com>2023-09-18 11:40:48 +0300
commit41fa35a8f4156b541c4b6d962e637b6f7f2a17cf (patch)
tree60e95909956984e074d77689a32afcdb9583b0a9
parent5ca175b387f39cb19005525d6f1aa2e4cbc60eb4 (diff)
parente4e46570f86dc3f05431bd0d5b5dbeb3e4b5cadb (diff)
Merge pull request #14406 from donaldsharp/pim_debug_fun
pimd: Display oil_parent as a string name of the interface
-rw-r--r--pimd/pim_mroute.c13
-rw-r--r--pimd/pim_oil.c17
-rw-r--r--pimd/pim_zlookup.c6
3 files changed, 22 insertions, 14 deletions
diff --git a/pimd/pim_mroute.c b/pimd/pim_mroute.c
index b64fcdeb87..089b0feb37 100644
--- a/pimd/pim_mroute.c
+++ b/pimd/pim_mroute.c
@@ -1276,10 +1276,15 @@ int pim_mroute_del(struct channel_oil *c_oil, const char *name)
if (!c_oil->installed) {
if (PIM_DEBUG_MROUTE) {
char buf[1000];
- zlog_debug(
- "%s %s: vifi %d for route is %s not installed, do not need to send del req. ",
- __FILE__, __func__, *oil_parent(c_oil),
- pim_channel_oil_dump(c_oil, buf, sizeof(buf)));
+ struct interface *iifp =
+ pim_if_find_by_vif_index(pim,
+ *oil_parent(c_oil));
+
+ zlog_debug("%s %s: incoming interface %s for route is %s not installed, do not need to send del req. ",
+ __FILE__, __func__,
+ iifp ? iifp->name : "Unknown",
+ pim_channel_oil_dump(c_oil, buf,
+ sizeof(buf)));
}
return -2;
}
diff --git a/pimd/pim_oil.c b/pimd/pim_oil.c
index e1ec9b34a1..1ae87a1bb3 100644
--- a/pimd/pim_oil.c
+++ b/pimd/pim_oil.c
@@ -286,13 +286,16 @@ int pim_channel_del_oif(struct channel_oil *channel_oil, struct interface *oif,
--channel_oil->oil_size;
if (PIM_DEBUG_MROUTE) {
- zlog_debug(
- "%s(%s): (S,G)=(%pPAs,%pPAs): proto_mask=%u IIF:%d OIF=%s vif_index=%d",
- __func__, caller, oil_origin(channel_oil),
- oil_mcastgrp(channel_oil),
- proto_mask,
- *oil_parent(channel_oil), oif->name,
- pim_ifp->mroute_vif_index);
+ struct interface *iifp =
+ pim_if_find_by_vif_index(pim_ifp->pim,
+ *oil_parent(channel_oil));
+
+
+ zlog_debug("%s(%s): (S,G)=(%pPAs,%pPAs): proto_mask=%u IIF:%s OIF=%s vif_index=%d",
+ __func__, caller, oil_origin(channel_oil),
+ oil_mcastgrp(channel_oil), proto_mask,
+ iifp ? iifp->name : "Unknown", oif->name,
+ pim_ifp->mroute_vif_index);
}
return 0;
diff --git a/pimd/pim_zlookup.c b/pimd/pim_zlookup.c
index 05a72269d6..c9f4d7a5a1 100644
--- a/pimd/pim_zlookup.c
+++ b/pimd/pim_zlookup.c
@@ -502,9 +502,9 @@ int pim_zlookup_sg_statistics(struct channel_oil *c_oil)
if (PIM_DEBUG_ZEBRA) {
more.src = *oil_origin(c_oil);
more.grp = *oil_mcastgrp(c_oil);
- zlog_debug(
- "Sending Request for New Channel Oil Information%pSG VIIF %d(%s)",
- &more, *oil_parent(c_oil), c_oil->pim->vrf->name);
+ zlog_debug("Sending Request for New Channel Oil Information%pSG VIIF %d(%s:%s)",
+ &more, *oil_parent(c_oil),
+ ifp ? ifp->name : "Unknown", c_oil->pim->vrf->name);
}
if (!ifp)