diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2022-05-06 10:28:52 +0200 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2022-07-08 14:58:38 +0200 |
| commit | b08967fbbc852b58dfb49a621c972716c1f41296 (patch) | |
| tree | b29b24ea6a3e5f015321fcee2d899a9ecf255a0f /pimd/pim6_cmd.c | |
| parent | bc0e6b1993524222ab2eb6cfea81e948600e1e2a (diff) | |
pim6d: add `clear ipv6 pim bsr-data`
This is needed for ANVL between testruns, and already in IPv4 too.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'pimd/pim6_cmd.c')
| -rw-r--r-- | pimd/pim6_cmd.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/pimd/pim6_cmd.c b/pimd/pim6_cmd.c index ff677c06f3..b7a832681d 100644 --- a/pimd/pim6_cmd.c +++ b/pimd/pim6_cmd.c @@ -1309,6 +1309,26 @@ DEFPY (clear_ipv6_mroute_count, return clear_ip_mroute_count_command(vty, name); } +DEFPY (clear_ipv6_pim_bsr_db, + clear_ipv6_pim_bsr_db_cmd, + "clear ipv6 pim [vrf NAME] bsr-data", + CLEAR_STR + IPV6_STR + CLEAR_IP_PIM_STR + VRF_CMD_HELP_STR + "Reset pim bsr data\n") +{ + struct vrf *v; + + v = vrf_lookup_by_name(vrf ? vrf : VRF_DEFAULT_NAME); + if (!v) + return CMD_WARNING; + + pim_bsm_clear(v->info); + + return CMD_SUCCESS; +} + DEFPY (debug_pimv6, debug_pimv6_cmd, "[no] debug pimv6", @@ -1578,6 +1598,8 @@ void pim_cmd_init(void) install_element(ENABLE_NODE, &clear_ipv6_mroute_cmd); install_element(ENABLE_NODE, &clear_ipv6_pim_oil_cmd); install_element(ENABLE_NODE, &clear_ipv6_mroute_count_cmd); + install_element(ENABLE_NODE, &clear_ipv6_pim_bsr_db_cmd); + install_element(ENABLE_NODE, &debug_pimv6_cmd); install_element(ENABLE_NODE, &debug_pimv6_nht_cmd); install_element(ENABLE_NODE, &debug_pimv6_nht_det_cmd); |
