summaryrefslogtreecommitdiff
path: root/pimd/pim6_cmd.c
diff options
context:
space:
mode:
authorAbhishek N R <abnr@vmware.com>2022-03-02 07:00:41 -0800
committerAbhishek N R <abnr@vmware.com>2022-03-14 23:11:14 -0700
commit47d4af36d80125696f4ce37f70ad8f1744eeb080 (patch)
tree86adfa7433824c3ed9018c040827b4a7774ab63c /pimd/pim6_cmd.c
parenteaa7d656bba7ca21a11b731d52c4b95bc54ab83f (diff)
pim6d: Adding "ipv6 mld version" CLI
Adding the Interface level config command ipv6 mld version <1-2> This command can be use to configure MLD version on the interface. Signed-off-by: Abhishek N R <abnr@vmware.com>
Diffstat (limited to 'pimd/pim6_cmd.c')
-rw-r--r--pimd/pim6_cmd.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/pimd/pim6_cmd.c b/pimd/pim6_cmd.c
index a7e2b0eb03..3e3671004d 100644
--- a/pimd/pim6_cmd.c
+++ b/pimd/pim6_cmd.c
@@ -549,6 +549,36 @@ DEFPY (interface_no_ipv6_mld,
"frr-routing:ipv6");
}
+DEFPY (interface_ipv6_mld_version,
+ interface_ipv6_mld_version_cmd,
+ "ipv6 mld version (1-2)$version",
+ IPV6_STR
+ IFACE_MLD_STR
+ "MLD version\n"
+ "MLD version number\n")
+{
+ nb_cli_enqueue_change(vty, "./enable", NB_OP_MODIFY, "true");
+ nb_cli_enqueue_change(vty, "./mld-version", NB_OP_MODIFY, version_str);
+
+ return nb_cli_apply_changes(vty, FRR_GMP_INTERFACE_XPATH,
+ "frr-routing:ipv6");
+}
+
+DEFPY (interface_no_ipv6_mld_version,
+ interface_no_ipv6_mld_version_cmd,
+ "no ipv6 mld version [(1-2)]",
+ NO_STR
+ IPV6_STR
+ IFACE_MLD_STR
+ "MLD version\n"
+ "MLD version number\n")
+{
+ nb_cli_enqueue_change(vty, "./mld-version", NB_OP_DESTROY, NULL);
+
+ return nb_cli_apply_changes(vty, FRR_GMP_INTERFACE_XPATH,
+ "frr-routing:ipv6");
+}
+
void pim_cmd_init(void)
{
if_cmd_init(pim_interface_config_write);
@@ -596,4 +626,6 @@ void pim_cmd_init(void)
install_element(INTERFACE_NODE, &interface_no_ipv6_mld_cmd);
install_element(INTERFACE_NODE, &interface_ipv6_mld_join_cmd);
install_element(INTERFACE_NODE, &interface_no_ipv6_mld_join_cmd);
+ install_element(INTERFACE_NODE, &interface_ipv6_mld_version_cmd);
+ install_element(INTERFACE_NODE, &interface_no_ipv6_mld_version_cmd);
}