diff options
author | Sarita Patra <saritap@vmware.com> | 2022-07-12 12:49:48 +0200 |
---|---|---|
committer | Sarita Patra <saritap@vmware.com> | 2022-10-20 10:07:46 +0200 |
commit | dfeda85c4bd6d19ee711750e8b8de6c4f6e82762 (patch) | |
tree | 31608b61bdef996efa71b19b4515d2f7ccda6c3d /pimd/pim_cmd.c | |
parent | pim6d: Add [no] ipv6 pim bsm" command (diff) | |
download | frr-dfeda85c4bd6d19ee711750e8b8de6c4f6e82762.tar.xz frr-dfeda85c4bd6d19ee711750e8b8de6c4f6e82762.zip |
pim6d: Add [no] ipv6 pim unicast-bsm" command
Introduced common api pim_process_unicast_bsm_cmd,
pim_process_no_unicast_bsm_cmd which will process
both "[no] ip pim unicast-bsm" command and "[no] ipv6 pim
unicast-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, 3 insertions, 26 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index c5c098774..c6f2e8dbd 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -5014,7 +5014,6 @@ DEFUN (ip_pim_bsm, { return pim_process_bsm_cmd(vty); } - DEFUN (no_ip_pim_bsm, no_ip_pim_bsm_cmd, "no ip pim bsm", @@ -5033,26 +5032,7 @@ DEFUN (ip_pim_ucast_bsm, PIM_STR "Accept/Send unicast BSM 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, "./unicast-bsm", NB_OP_MODIFY, "true"); - - return nb_cli_apply_changes(vty, - FRR_PIM_INTERFACE_XPATH, "frr-routing:ipv4"); - + return pim_process_unicast_bsm_cmd(vty); } DEFUN (no_ip_pim_ucast_bsm, @@ -5061,12 +5041,9 @@ DEFUN (no_ip_pim_ucast_bsm, NO_STR IP_STR PIM_STR - "Block send/receive unicast BSM on this interface\n") + "Accept/Send unicast BSM on the interface\n") { - nb_cli_enqueue_change(vty, "./unicast-bsm", NB_OP_MODIFY, "false"); - - return nb_cli_apply_changes(vty, - FRR_PIM_INTERFACE_XPATH, "frr-routing:ipv4"); + return pim_process_no_unicast_bsm_cmd(vty); } #if HAVE_BFDD > 0 |