From c07ddc36563cc147cd257ddcae4359867e2daa82 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Thu, 17 Mar 2022 09:31:05 +0200 Subject: [PATCH] pimd: Show all groups matched by an arbitrary prefix for `pim rp-info` ``` r1# show ip pim rp-info RP address group/prefix-list OIF I am RP Source Group-Type 192.168.10.123 225.0.0.0/24 eth2 yes Static ASM 192.168.10.123 239.0.0.0/8 eth2 yes Static ASM 192.168.10.123 239.4.0.0/24 eth2 yes Static SSM r1# show ip pim rp-info 239.4.0.0/25 RP address group/prefix-list OIF I am RP Source Group-Type 192.168.10.123 239.0.0.0/8 eth2 yes Static ASM 192.168.10.123 239.4.0.0/24 eth2 yes Static SSM ``` Signed-off-by: Donatas Abraitis --- doc/user/pim.rst | 15 ++++++++++++++- pimd/pim_rp.c | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/doc/user/pim.rst b/doc/user/pim.rst index 30363dfdf6..237d5fef49 100644 --- a/doc/user/pim.rst +++ b/doc/user/pim.rst @@ -509,7 +509,20 @@ cause great confusion. Display information about RP's that are configured on this router. - You can filter the output by specifying an arbitrary group. + You can filter the output by specifying an arbitrary group range. + + .. code-block:: frr + + # show ip pim rp-info + RP address group/prefix-list OIF I am RP Source Group-Type + 192.168.10.123 225.0.0.0/24 eth2 yes Static ASM + 192.168.10.123 239.0.0.0/8 eth2 yes Static ASM + 192.168.10.123 239.4.0.0/24 eth2 yes Static SSM + + # show ip pim rp-info 239.4.0.0/25 + RP address group/prefix-list OIF I am RP Source Group-Type + 192.168.10.123 239.0.0.0/8 eth2 yes Static ASM + 192.168.10.123 239.4.0.0/24 eth2 yes Static SSM .. clicmd:: show ip pim rpf diff --git a/pimd/pim_rp.c b/pimd/pim_rp.c index 99727cf837..a552e77823 100644 --- a/pimd/pim_rp.c +++ b/pimd/pim_rp.c @@ -1175,7 +1175,7 @@ void pim_rp_show_information(struct pim_instance *pim, struct prefix *range, const char *group_type = pim_is_grp_ssm(pim, group) ? "SSM" : "ASM"; - if (range && !prefix_same(&rp_info->group, range)) + if (range && !prefix_match(&rp_info->group, range)) continue; if (rp_info->rp_src == RP_SRC_STATIC) -- 2.39.5