diff options
| author | Sai Gomathi N <nsaigomathi@vmware.com> | 2022-04-13 06:14:02 -0700 |
|---|---|---|
| committer | Sai Gomathi N <nsaigomathi@vmware.com> | 2022-05-16 22:47:05 -0700 |
| commit | a14ae314124684188e8a6b5ec65cef79295da41f (patch) | |
| tree | c2e3a56a1fdddc111739c8546c9d176a4bd1a18d /pimd/pim6_cmd.c | |
| parent | ef1b0a2d8cbf6ce7bcb3da4e730ef02eb5de5f03 (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/pim6_cmd.c')
| -rw-r--r-- | pimd/pim6_cmd.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/pimd/pim6_cmd.c b/pimd/pim6_cmd.c index 94074f256a..e88a832cc3 100644 --- a/pimd/pim6_cmd.c +++ b/pimd/pim6_cmd.c @@ -1954,6 +1954,24 @@ DEFPY (clear_ipv6_pim_statistics, return CMD_SUCCESS; } +DEFPY (clear_ipv6_mroute, + clear_ipv6_mroute_cmd, + "clear ipv6 mroute [vrf NAME]$name", + CLEAR_STR + IPV6_STR + "Reset multicast routes\n" + VRF_CMD_HELP_STR) +{ + struct vrf *v = pim_cmd_lookup(vty, name); + + if (!v) + return CMD_WARNING; + + clear_mroute(v->info); + + return CMD_SUCCESS; +} + void pim_cmd_init(void) { if_cmd_init(pim_interface_config_write); @@ -2062,4 +2080,5 @@ void pim_cmd_init(void) install_element(VIEW_NODE, &show_ipv6_mroute_summary_vrf_all_cmd); install_element(ENABLE_NODE, &clear_ipv6_pim_statistics_cmd); + install_element(ENABLE_NODE, &clear_ipv6_mroute_cmd); } |
