From 7b1d9214568ed7e0c7ef0b63f7ef8fa260833561 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 7 Feb 2022 19:55:00 -0500 Subject: [PATCH] pimd: Modify `show ip pim assert` to only show interesting bits `show ip pim assert` shows S,G ifchannel information even when there is no information available about the assert process. Fix the code to not dump non-interesting cases. Fixes: 10462 Signed-off-by: Donald Sharp (cherry picked from commit 35e5ef55f1ec3f6e3fa78c268b2ed2a392b17d23) --- doc/user/pim.rst | 1 + pimd/pim_cmd.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/doc/user/pim.rst b/doc/user/pim.rst index 899a6b0078..a61f322cc9 100644 --- a/doc/user/pim.rst +++ b/doc/user/pim.rst @@ -436,6 +436,7 @@ cause great confusion. .. clicmd:: show ip pim assert Display information about asserts in the PIM system for S,G mroutes. + This command does not show S,G Channel states that in a NOINFO state. .. clicmd:: show ip pim assert-internal diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index e2ac777304..f346e3c6b9 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -143,6 +143,9 @@ static void pim_show_assert(struct pim_instance *pim, struct vty *vty) continue; RB_FOREACH (ch, pim_ifchannel_rb, &pim_ifp->ifchannel_rb) { + if (ch->ifassert_state == PIM_IFASSERT_NOINFO) + continue; + pim_show_assert_helper(vty, pim_ifp, ch, now); } /* scan interface channels */ } -- 2.39.5