diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2024-01-23 18:28:33 +0200 |
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2024-01-28 23:28:39 +0200 |
| commit | 509eb9c29775ed8c9654ec21edb72d7ecebc3488 (patch) | |
| tree | 5cabcfec4922becd917aa9efa6de532a16f61e45 /zebra/zebra_nb_config.c | |
| parent | 26f80e96698f35ffe6f41aabb9c2fcd0af998a42 (diff) | |
zebra: convert interface ipv6 nd home-agent-config-flag command to NB
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'zebra/zebra_nb_config.c')
| -rw-r--r-- | zebra/zebra_nb_config.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/zebra/zebra_nb_config.c b/zebra/zebra_nb_config.c index 7d765728ce..edd2e68881 100644 --- a/zebra/zebra_nb_config.c +++ b/zebra/zebra_nb_config.c @@ -2552,6 +2552,29 @@ int lib_interface_zebra_ipv6_router_advertisements_other_config_flag_modify( } /* + * XPath: /frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/home-agent-flag + */ +int lib_interface_zebra_ipv6_router_advertisements_home_agent_flag_modify( + struct nb_cb_modify_args *args) +{ + struct interface *ifp; + struct zebra_if *zif; + bool home_agent_flag; + + if (args->event != NB_EV_APPLY) + return NB_OK; + + ifp = nb_running_get_entry(args->dnode, NULL, true); + zif = ifp->info; + + home_agent_flag = yang_dnode_get_bool(args->dnode, NULL); + + zif->rtadv.AdvHomeAgentFlag = !!home_agent_flag; + + return NB_OK; +} + +/* * XPath: /frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/link-mtu */ int lib_interface_zebra_ipv6_router_advertisements_link_mtu_modify( |
