summaryrefslogtreecommitdiff
path: root/pimd/pim_cmd.c
diff options
context:
space:
mode:
authorSai Gomathi N <nsaigomathi@vmware.com>2022-04-13 06:14:02 -0700
committerSai Gomathi N <nsaigomathi@vmware.com>2022-05-16 22:47:05 -0700
commita14ae314124684188e8a6b5ec65cef79295da41f (patch)
treec2e3a56a1fdddc111739c8546c9d176a4bd1a18d /pimd/pim_cmd.c
parentef1b0a2d8cbf6ce7bcb3da4e730ef02eb5de5f03 (diff)
pim6d: Add 'clear ipv6 mroute [vrf NAME]' command
Adding clear ipv6 mroute cli for resetting the PIMv6 mroutes. Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
Diffstat (limited to 'pimd/pim_cmd.c')
-rw-r--r--pimd/pim_cmd.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index 0200597857..5c6c1e3d00 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -1840,21 +1840,20 @@ DEFPY (clear_ip_pim_statistics,
return CMD_SUCCESS;
}
-DEFUN (clear_ip_mroute,
+DEFPY (clear_ip_mroute,
clear_ip_mroute_cmd,
- "clear ip mroute [vrf NAME]",
+ "clear ip mroute [vrf NAME]$name",
CLEAR_STR
IP_STR
"Reset multicast routes\n"
VRF_CMD_HELP_STR)
{
- int idx = 2;
- struct vrf *vrf = pim_cmd_lookup_vrf(vty, argv, argc, &idx);
+ struct vrf *v = pim_cmd_lookup(vty, name);
- if (!vrf)
+ if (!v)
return CMD_WARNING;
- clear_mroute(vrf->info);
+ clear_mroute(v->info);
return CMD_SUCCESS;
}