summaryrefslogtreecommitdiffstats
path: root/pimd/pim6_cmd.c
diff options
context:
space:
mode:
authorAbhishek N R <abnr@vmware.com>2022-06-09 12:10:21 +0200
committerAbhishek N R <abnr@vmware.com>2022-06-09 12:10:21 +0200
commitc630970866da41b90e3276ed5e8eeb52ccdda0ab (patch)
tree9dc1cbae5a9fb33f17199524ec540e8d36d91032 /pimd/pim6_cmd.c
parentpim6d: Moving reusable code to common api for "show pim upstream join desired... (diff)
downloadfrr-c630970866da41b90e3276ed5e8eeb52ccdda0ab.tar.xz
frr-c630970866da41b90e3276ed5e8eeb52ccdda0ab.zip
pim6d: Moving reusable code to common api for "show pim upstream rpf" command
Signed-off-by: Abhishek N R <abnr@vmware.com>
Diffstat (limited to 'pimd/pim6_cmd.c')
-rw-r--r--pimd/pim6_cmd.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/pimd/pim6_cmd.c b/pimd/pim6_cmd.c
index 998e0d1d7..7f057dd50 100644
--- a/pimd/pim6_cmd.c
+++ b/pimd/pim6_cmd.c
@@ -913,25 +913,7 @@ DEFPY (show_ipv6_pim_upstream_rpf,
"PIM upstream source rpf\n"
JSON_STR)
{
- struct pim_instance *pim;
- struct vrf *v;
- bool uj = !!json;
-
- v = vrf_lookup_by_name(vrf ? vrf : VRF_DEFAULT_NAME);
-
- if (!v)
- return CMD_WARNING;
-
- pim = pim_get_pim_instance(v->vrf_id);
-
- if (!pim) {
- vty_out(vty, "%% Unable to find pim instance\n");
- return CMD_WARNING;
- }
-
- pim_show_upstream_rpf(pim, vty, uj);
-
- return CMD_SUCCESS;
+ return pim_show_upstream_rpf_helper(vrf, vty, !!json);
}
DEFPY (show_ipv6_pim_state,