summaryrefslogtreecommitdiffstats
path: root/pimd/pim_cmd.c
diff options
context:
space:
mode:
authorSarita Patra <saritap@vmware.com>2022-07-12 12:45:14 +0200
committerSarita Patra <saritap@vmware.com>2022-10-20 10:06:30 +0200
commit5e651c369947edbe7bc5bea07770c9a00f061abf (patch)
tree8ede062e7df8e5e80357b2397a8ad460a4fd9b05 /pimd/pim_cmd.c
parentMerge pull request #12136 from opensourcerouting/fix/drop_leftovers (diff)
downloadfrr-5e651c369947edbe7bc5bea07770c9a00f061abf.tar.xz
frr-5e651c369947edbe7bc5bea07770c9a00f061abf.zip
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.c29
1 files changed, 4 insertions, 25 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index ab0689a15..c5c098774 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,