summaryrefslogtreecommitdiff
path: root/pimd/pim_cmd.c
diff options
context:
space:
mode:
authorSai Gomathi N <nsaigomathi@vmware.com>2022-04-13 04:16:59 -0700
committerSai Gomathi N <nsaigomathi@vmware.com>2022-05-16 22:47:05 -0700
commitef1b0a2d8cbf6ce7bcb3da4e730ef02eb5de5f03 (patch)
tree7c92265bc7d7a4f541bfd2c7fafb925430446ed3 /pimd/pim_cmd.c
parentfe0c6838c5dc781fd3f55783f9c9061e6803a502 (diff)
pim6d: Adding 'clear ipv6 pim statistics [vrf NAME]' cmd
Adding clear ipv6 pim statistics cli for resetting pimv6 statistics Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
Diffstat (limited to 'pimd/pim_cmd.c')
-rw-r--r--pimd/pim_cmd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index bdf015642f..0200597857 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -1821,22 +1821,22 @@ DEFUN (clear_ip_igmp_interfaces,
return CMD_SUCCESS;
}
-DEFUN (clear_ip_pim_statistics,
+DEFPY (clear_ip_pim_statistics,
clear_ip_pim_statistics_cmd,
- "clear ip pim statistics [vrf NAME]",
+ "clear ip pim statistics [vrf NAME]$name",
CLEAR_STR
IP_STR
CLEAR_IP_PIM_STR
VRF_CMD_HELP_STR
"Reset PIM statistics\n")
{
- 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_pim_statistics(vrf->info);
+ clear_pim_statistics(v->info);
+
return CMD_SUCCESS;
}