return CMD_SUCCESS;
}
-DEFUN (ipv6_nd_other_config_flag,
+DEFPY_YANG (ipv6_nd_other_config_flag,
ipv6_nd_other_config_flag_cmd,
- "ipv6 nd other-config-flag",
- "Interface IPv6 config commands\n"
- "Neighbor discovery\n"
- "Other statefull configuration flag\n")
-{
- VTY_DECLVAR_CONTEXT(interface, ifp);
- struct zebra_if *zif = ifp->info;
-
- zif->rtadv.AdvOtherConfigFlag = 1;
-
- return CMD_SUCCESS;
-}
-
-DEFUN (no_ipv6_nd_other_config_flag,
- no_ipv6_nd_other_config_flag_cmd,
- "no ipv6 nd other-config-flag",
+ "[no] ipv6 nd other-config-flag",
NO_STR
"Interface IPv6 config commands\n"
"Neighbor discovery\n"
"Other statefull configuration flag\n")
{
- VTY_DECLVAR_CONTEXT(interface, ifp);
- struct zebra_if *zif = ifp->info;
-
- zif->rtadv.AdvOtherConfigFlag = 0;
-
- return CMD_SUCCESS;
+ if (!no)
+ nb_cli_enqueue_change(vty,
+ "./frr-zebra:zebra/ipv6-router-advertisements/other-config-flag",
+ NB_OP_MODIFY, "true");
+ else
+ nb_cli_enqueue_change(vty,
+ "./frr-zebra:zebra/ipv6-router-advertisements/other-config-flag",
+ NB_OP_DESTROY, NULL);
+ return nb_cli_apply_changes(vty, NULL);
}
DEFUN (ipv6_nd_prefix,
install_element(INTERFACE_NODE, &ipv6_nd_reachable_time_cmd);
install_element(INTERFACE_NODE, &ipv6_nd_managed_config_flag_cmd);
install_element(INTERFACE_NODE, &ipv6_nd_other_config_flag_cmd);
- install_element(INTERFACE_NODE, &no_ipv6_nd_other_config_flag_cmd);
install_element(INTERFACE_NODE, &ipv6_nd_homeagent_config_flag_cmd);
install_element(INTERFACE_NODE, &no_ipv6_nd_homeagent_config_flag_cmd);
install_element(INTERFACE_NODE, &ipv6_nd_homeagent_preference_cmd);
struct nb_cb_modify_args *args);
int lib_interface_zebra_ipv6_router_advertisements_managed_flag_modify(
struct nb_cb_modify_args *args);
+int lib_interface_zebra_ipv6_router_advertisements_other_config_flag_modify(
+ struct nb_cb_modify_args *args);
int lib_interface_zebra_ipv6_router_advertisements_reachable_time_modify(
struct nb_cb_modify_args *args);
int lib_interface_zebra_ipv6_router_advertisements_default_lifetime_modify(
return NB_OK;
}
+/*
+ * XPath: /frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/other-config-flag
+ */
+int lib_interface_zebra_ipv6_router_advertisements_other_config_flag_modify(
+ struct nb_cb_modify_args *args)
+{
+ struct interface *ifp;
+ struct zebra_if *zif;
+ bool other_config_flag;
+
+ if (args->event != NB_EV_APPLY)
+ return NB_OK;
+
+ ifp = nb_running_get_entry(args->dnode, NULL, true);
+ zif = ifp->info;
+
+ other_config_flag = yang_dnode_get_bool(args->dnode, NULL);
+
+ zif->rtadv.AdvOtherConfigFlag = !!other_config_flag;
+
+ return NB_OK;
+}
+
/*
* XPath: /frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/reachable-time
*/