diff options
| author | Sarita Patra <saritap@vmware.com> | 2022-07-12 03:45:14 -0700 |
|---|---|---|
| committer | Sarita Patra <saritap@vmware.com> | 2022-10-20 01:06:30 -0700 |
| commit | 5e651c369947edbe7bc5bea07770c9a00f061abf (patch) | |
| tree | 8ede062e7df8e5e80357b2397a8ad460a4fd9b05 /pimd/pim_cmd.c | |
| parent | a654221c7083dd27741b48f3167ca49c3c51048c (diff) | |
pim6d: Add [no] ipv6 pim bsm" command
Introduced common api pim_process_bsm_cmd,
pim_process_no_bsm_cmd which will process
both "[no] ip pim bsm" command and "[no] ipv6 pim
bsm" command.
Signed-off-by: Sarita Patra <saritap@vmware.com>
Diffstat (limited to 'pimd/pim_cmd.c')
| -rw-r--r-- | pimd/pim_cmd.c | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index ab0689a156..c5c098774c 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -5010,27 +5010,9 @@ DEFUN (ip_pim_bsm, "ip pim bsm", IP_STR PIM_STR - "Enables BSM support on the interface\n") + "Enable BSM support on the interface\n") { - const struct lyd_node *igmp_enable_dnode; - - igmp_enable_dnode = - yang_dnode_getf(vty->candidate_config->dnode, - FRR_GMP_ENABLE_XPATH, VTY_CURR_XPATH, - "frr-routing:ipv4"); - if (!igmp_enable_dnode) - nb_cli_enqueue_change(vty, "./pim-enable", NB_OP_MODIFY, - "true"); - else { - if (!yang_dnode_get_bool(igmp_enable_dnode, ".")) - nb_cli_enqueue_change(vty, "./pim-enable", NB_OP_MODIFY, - "true"); - } - - nb_cli_enqueue_change(vty, "./bsm", NB_OP_MODIFY, "true"); - - return nb_cli_apply_changes(vty, - FRR_PIM_INTERFACE_XPATH, "frr-routing:ipv4"); + return pim_process_bsm_cmd(vty); } DEFUN (no_ip_pim_bsm, @@ -5039,12 +5021,9 @@ DEFUN (no_ip_pim_bsm, NO_STR IP_STR PIM_STR - "Disables BSM support\n") + "Enable BSM support on the interface\n") { - nb_cli_enqueue_change(vty, "./bsm", NB_OP_MODIFY, "false"); - - return nb_cli_apply_changes(vty, - FRR_PIM_INTERFACE_XPATH, "frr-routing:ipv4"); + return pim_process_no_bsm_cmd(vty); } DEFUN (ip_pim_ucast_bsm, |
