diff --git a/lib/vty.c b/lib/vty.c index f2076552c7cb..a8d90d901be5 100644 --- a/lib/vty.c +++ b/lib/vty.c @@ -127,6 +127,9 @@ char const *const mgmt_daemons[] = { #ifdef HAVE_RIPD "ripd", #endif +#ifdef HAVE_RIPNGD + "ripngd", +#endif #ifdef HAVE_STATICD "staticd", #endif diff --git a/mgmtd/mgmt_be_adapter.c b/mgmtd/mgmt_be_adapter.c index a7f3d4390e96..f92d6d8d58bd 100644 --- a/mgmtd/mgmt_be_adapter.c +++ b/mgmtd/mgmt_be_adapter.c @@ -36,9 +36,12 @@ const char *mgmt_be_client_names[MGMTD_BE_CLIENT_ID_MAX + 1] = { [MGMTD_BE_CLIENT_ID_ZEBRA] = "zebra", -#ifdef HAVE_STATICD +#ifdef HAVE_RIPD [MGMTD_BE_CLIENT_ID_RIPD] = "ripd", #endif +#ifdef HAVE_RIPNGD + [MGMTD_BE_CLIENT_ID_RIPNGD] = "ripngd", +#endif #ifdef HAVE_STATICD [MGMTD_BE_CLIENT_ID_STATICD] = "staticd", #endif @@ -77,6 +80,21 @@ static const char *const ripd_oper_xpaths[] = { }; #endif +#if HAVE_RIPNGD +static const char *const ripngd_config_xpaths[] = { + "/frr-filter:lib", + "/frr-interface:lib/interface", + "/frr-ripngd:ripngd", + "/frr-route-map:lib", + "/frr-vrf:lib", + NULL, +}; +static const char *const ripngd_oper_xpaths[] = { + "/frr-ripd:ripd", + NULL, +}; +#endif + #if HAVE_STATICD static const char *const staticd_config_xpaths[] = { "/frr-vrf:lib", @@ -90,6 +108,9 @@ static const char *const *be_client_config_xpaths[MGMTD_BE_CLIENT_ID_MAX] = { #ifdef HAVE_RIPD [MGMTD_BE_CLIENT_ID_RIPD] = ripd_config_xpaths, #endif +#ifdef HAVE_RIPNGD + [MGMTD_BE_CLIENT_ID_RIPNGD] = ripngd_config_xpaths, +#endif #ifdef HAVE_STATICD [MGMTD_BE_CLIENT_ID_STATICD] = staticd_config_xpaths, #endif @@ -105,6 +126,9 @@ static const char *const zebra_oper_xpaths[] = { static const char *const *be_client_oper_xpaths[MGMTD_BE_CLIENT_ID_MAX] = { #ifdef HAVE_RIPD [MGMTD_BE_CLIENT_ID_RIPD] = ripd_oper_xpaths, +#endif +#ifdef HAVE_RIPNGD + [MGMTD_BE_CLIENT_ID_RIPNGD] = ripngd_oper_xpaths, #endif [MGMTD_BE_CLIENT_ID_ZEBRA] = zebra_oper_xpaths, }; diff --git a/mgmtd/mgmt_be_adapter.h b/mgmtd/mgmt_be_adapter.h index 35c8ec4c7add..955291b7c89b 100644 --- a/mgmtd/mgmt_be_adapter.h +++ b/mgmtd/mgmt_be_adapter.h @@ -17,7 +17,7 @@ #define MGMTD_BE_CONN_INIT_DELAY_MSEC 50 -#define MGMTD_FIND_ADAPTER_BY_INDEX(adapter_index) \ +#define MGMTD_FIND_ADAPTER_BY_INDEX(adapter_index) \ mgmt_adaptr_ref[adapter_index] /** @@ -30,6 +30,9 @@ enum mgmt_be_client_id { #ifdef HAVE_RIPD MGMTD_BE_CLIENT_ID_RIPD, #endif +#ifdef HAVE_RIPNGD + MGMTD_BE_CLIENT_ID_RIPNGD, +#endif #ifdef HAVE_STATICD MGMTD_BE_CLIENT_ID_STATICD, #endif diff --git a/mgmtd/mgmt_main.c b/mgmtd/mgmt_main.c index 6532e9b1bf72..1bb129944420 100644 --- a/mgmtd/mgmt_main.c +++ b/mgmtd/mgmt_main.c @@ -15,6 +15,7 @@ #include "mgmtd/mgmt.h" #include "mgmtd/mgmt_ds.h" #include "ripd/rip_nb.h" +#include "ripngd/ripng_nb.h" #include "routing_nb.h" @@ -188,6 +189,9 @@ static const struct frr_yang_module_info *const mgmt_yang_modules[] = { #ifdef HAVE_RIPD &frr_ripd_cli_info, #endif +#ifdef HAVE_RIPNGD + &frr_ripngd_cli_info, +#endif #ifdef HAVE_STATICD &frr_staticd_cli_info, #endif diff --git a/mgmtd/mgmt_vty.c b/mgmtd/mgmt_vty.c index c88fd2f25b24..194af13f1eb2 100644 --- a/mgmtd/mgmt_vty.c +++ b/mgmtd/mgmt_vty.c @@ -9,6 +9,7 @@ #include #include "command.h" +#include "filter.h" #include "json.h" #include "network.h" #include "northbound_cli.h" @@ -21,7 +22,8 @@ #include "mgmtd/mgmt_history.h" #include "mgmtd/mgmt_vty_clippy.c" -#include "ripd/ripd.h" +#include "ripd/rip_nb.h" +#include "ripngd/ripng_nb.h" #include "staticd/static_vty.h" extern struct frr_daemon_info *mgmt_daemon_info; @@ -578,6 +580,9 @@ void mgmt_vty_init(void) #if HAVE_RIPD rip_cli_init(); #endif +#if HAVE_RIPNGD + ripng_cli_init(); +#endif #if HAVE_STATICD static_vty_init(); #endif diff --git a/mgmtd/subdir.am b/mgmtd/subdir.am index 244710d733f6..3d1dafabd4ee 100644 --- a/mgmtd/subdir.am +++ b/mgmtd/subdir.am @@ -74,6 +74,15 @@ mgmtd_libmgmt_be_nb_la_SOURCES += \ # end endif +if RIPNGD +nodist_mgmtd_mgmtd_SOURCES += \ + yang/frr-ripngd.yang.c \ + # end +mgmtd_libmgmt_be_nb_la_SOURCES += \ + ripngd/ripng_cli.c \ + # end +endif + if STATICD nodist_mgmtd_mgmtd_SOURCES += \ yang/frr-staticd.yang.c \ diff --git a/python/xref2vtysh.py b/python/xref2vtysh.py index c52ae5b9a6fd..1760588ca84e 100644 --- a/python/xref2vtysh.py +++ b/python/xref2vtysh.py @@ -206,10 +206,7 @@ def _get_daemons(self): } if defun_file == "lib/if_rmap.c": - if v6_cmd: - return {"VTYSH_RIPNGD"} - else: - return {"VTYSH_MGMTD"} + return {"VTYSH_MGMTD"} return {} diff --git a/ripd/rip_nb.h b/ripd/rip_nb.h index 7521e0fba92c..d07273af8029 100644 --- a/ripd/rip_nb.h +++ b/ripd/rip_nb.h @@ -240,4 +240,6 @@ void cli_show_ip_rip_bfd_profile(struct vty *vty, const struct lyd_node *dnode, extern void ripd_notif_send_auth_type_failure(const char *ifname); extern void ripd_notif_send_auth_failure(const char *ifname); +extern void rip_cli_init(void); + #endif /* _FRR_RIP_NB_H_ */ diff --git a/ripd/ripd.h b/ripd/ripd.h index ac4a51f586fd..b7e79332fed4 100644 --- a/ripd/ripd.h +++ b/ripd/ripd.h @@ -526,7 +526,6 @@ extern int offset_list_cmp(struct rip_offset_list *o1, extern void rip_vrf_init(void); extern void rip_vrf_terminate(void); -extern void rip_cli_init(void); extern struct zebra_privs_t ripd_privs; extern struct rip_instance_head rip_instances; diff --git a/ripngd/ripng_cli.c b/ripngd/ripng_cli.c index ee561087c9ee..a4a0f5a2cb38 100644 --- a/ripngd/ripng_cli.c +++ b/ripngd/ripng_cli.c @@ -8,6 +8,7 @@ #include #include "if.h" +#include "if_rmap.h" #include "vrf.h" #include "log.h" #include "prefix.h" @@ -648,8 +649,20 @@ DEFPY_YANG(no_ripng_ipv6_distribute_list_prefix, return nb_cli_apply_changes(vty, NULL); } +/* RIPng node structure. */ +static struct cmd_node cmd_ripng_node = { + .name = "ripng", + .node = RIPNG_NODE, + .parent_node = CONFIG_NODE, + .prompt = "%s(config-router)# ", +}; + void ripng_cli_init(void) { + /* Install RIPNG_NODE. */ + install_node(&cmd_ripng_node); + install_default(RIPNG_NODE); + install_element(CONFIG_NODE, &router_ripng_cmd); install_element(CONFIG_NODE, &no_router_ripng_cmd); @@ -676,4 +689,91 @@ void ripng_cli_init(void) install_element(INTERFACE_NODE, &ipv6_ripng_split_horizon_cmd); install_element(ENABLE_NODE, &clear_ipv6_rip_cmd); -} + + if_rmap_init(RIPNG_NODE); +} + +/* clang-format off */ +const struct frr_yang_module_info frr_ripngd_cli_info = { + .name = "frr-ripngd", + .ignore_cfg_cbs = true, + .nodes = { + { + .xpath = "/frr-ripngd:ripngd/instance", + .cbs.cli_show = cli_show_router_ripng, + }, + { + .xpath = "/frr-ripngd:ripngd/instance/allow-ecmp", + .cbs.cli_show = cli_show_ripng_allow_ecmp, + }, + { + .xpath = "/frr-ripngd:ripngd/instance/default-information-originate", + .cbs.cli_show = cli_show_ripng_default_information_originate, + }, + { + .xpath = "/frr-ripngd:ripngd/instance/default-metric", + .cbs.cli_show = cli_show_ripng_default_metric, + }, + { + .xpath = "/frr-ripngd:ripngd/instance/network", + .cbs.cli_show = cli_show_ripng_network_prefix, + }, + { + .xpath = "/frr-ripngd:ripngd/instance/interface", + .cbs.cli_show = cli_show_ripng_network_interface, + }, + { + .xpath = "/frr-ripngd:ripngd/instance/offset-list", + .cbs.cli_show = cli_show_ripng_offset_list, + }, + { + .xpath = "/frr-ripngd:ripngd/instance/passive-interface", + .cbs.cli_show = cli_show_ripng_passive_interface, + }, + { + .xpath = "/frr-ripngd:ripngd/instance/distribute-list/in/access-list", + .cbs.cli_show = group_distribute_list_ipv6_cli_show, + }, + { + .xpath = "/frr-ripngd:ripngd/instance/distribute-list/out/access-list", + .cbs.cli_show = group_distribute_list_ipv6_cli_show, + }, + { + .xpath = "/frr-ripngd:ripngd/instance/distribute-list/in/prefix-list", + .cbs.cli_show = group_distribute_list_ipv6_cli_show, + }, + { + .xpath = "/frr-ripngd:ripngd/instance/distribute-list/out/prefix-list", + .cbs.cli_show = group_distribute_list_ipv6_cli_show, + }, + { + .xpath = "/frr-ripngd:ripngd/instance/redistribute", + .cbs.cli_show = cli_show_ripng_redistribute, + }, + { + .xpath = "/frr-ripngd:ripngd/instance/if-route-maps/if-route-map", + .cbs.cli_show = cli_show_if_route_map, + }, + { + .xpath = "/frr-ripngd:ripngd/instance/static-route", + .cbs.cli_show = cli_show_ripng_route, + }, + { + .xpath = "/frr-ripngd:ripngd/instance/aggregate-address", + .cbs.cli_show = cli_show_ripng_aggregate_address, + }, + { + .xpath = "/frr-ripngd:ripngd/instance/timers", + .cbs.cli_show = cli_show_ripng_timers, + }, + { + .xpath = "/frr-interface:lib/interface/frr-ripngd:ripng/split-horizon", + .cbs = { + .cli_show = cli_show_ipv6_ripng_split_horizon, + }, + }, + { + .xpath = NULL, + }, + } +}; diff --git a/ripngd/ripng_interface.c b/ripngd/ripng_interface.c index 35d92632a00c..9ef9f89005ec 100644 --- a/ripngd/ripng_interface.c +++ b/ripngd/ripng_interface.c @@ -873,7 +873,6 @@ void ripng_if_init(void) hook_register_prio(if_del, 0, ripng_if_delete_hook); /* Install interface node. */ - if_cmd_init_default(); hook_register_prio(if_real, 0, ripng_ifp_create); hook_register_prio(if_up, 0, ripng_ifp_up); hook_register_prio(if_down, 0, ripng_ifp_down); diff --git a/ripngd/ripng_main.c b/ripngd/ripng_main.c index a799943be170..80b78a150a5a 100644 --- a/ripngd/ripng_main.c +++ b/ripngd/ripng_main.c @@ -22,6 +22,7 @@ #include "if_rmap.h" #include "libfrr.h" #include "routemap.h" +#include "mgmt_be_client.h" #include "ripngd/ripngd.h" #include "ripngd/ripng_nb.h" @@ -52,6 +53,8 @@ struct zebra_privs_t ripngd_privs = { /* Master of threads. */ struct event_loop *master; +struct mgmt_be_client *mgmt_be_client; + static struct frr_daemon_info ripngd_di; /* SIGHUP handler. */ @@ -70,6 +73,10 @@ static void sigint(void) zlog_notice("Terminating on signal"); + nb_oper_cancel_all_walks(); + mgmt_be_client_destroy(mgmt_be_client); + mgmt_be_client = NULL; + RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) { if (!vrf->info) continue; @@ -131,6 +138,9 @@ FRR_DAEMON_INFO(ripngd, RIPNG, .vty_port = RIPNG_VTY_PORT, .yang_modules = ripngd_yang_modules, .n_yang_modules = array_size(ripngd_yang_modules), + + /* mgmtd will load the per-daemon config file now */ + .flags = FRR_NO_SPLIT_CONFIG, ); #define DEPRECATED_OPTIONS "" @@ -172,7 +182,9 @@ int main(int argc, char **argv) /* RIPngd inits. */ ripng_init(); - ripng_cli_init(); + + mgmt_be_client = mgmt_be_client_create("ripngd", NULL, 0, master); + zebra_init(master); frr_config_fork(); diff --git a/ripngd/ripng_nb.c b/ripngd/ripng_nb.c index 583a4d08d077..8e2054173380 100644 --- a/ripngd/ripng_nb.c +++ b/ripngd/ripng_nb.c @@ -20,7 +20,6 @@ const struct frr_yang_module_info frr_ripngd_info = { { .xpath = "/frr-ripngd:ripngd/instance", .cbs = { - .cli_show = cli_show_router_ripng, .create = ripngd_instance_create, .destroy = ripngd_instance_destroy, .get_keys = ripngd_instance_get_keys, @@ -31,28 +30,24 @@ const struct frr_yang_module_info frr_ripngd_info = { { .xpath = "/frr-ripngd:ripngd/instance/allow-ecmp", .cbs = { - .cli_show = cli_show_ripng_allow_ecmp, .modify = ripngd_instance_allow_ecmp_modify, }, }, { .xpath = "/frr-ripngd:ripngd/instance/default-information-originate", .cbs = { - .cli_show = cli_show_ripng_default_information_originate, .modify = ripngd_instance_default_information_originate_modify, }, }, { .xpath = "/frr-ripngd:ripngd/instance/default-metric", .cbs = { - .cli_show = cli_show_ripng_default_metric, .modify = ripngd_instance_default_metric_modify, }, }, { .xpath = "/frr-ripngd:ripngd/instance/network", .cbs = { - .cli_show = cli_show_ripng_network_prefix, .create = ripngd_instance_network_create, .destroy = ripngd_instance_network_destroy, }, @@ -60,7 +55,6 @@ const struct frr_yang_module_info frr_ripngd_info = { { .xpath = "/frr-ripngd:ripngd/instance/interface", .cbs = { - .cli_show = cli_show_ripng_network_interface, .create = ripngd_instance_interface_create, .destroy = ripngd_instance_interface_destroy, }, @@ -68,7 +62,6 @@ const struct frr_yang_module_info frr_ripngd_info = { { .xpath = "/frr-ripngd:ripngd/instance/offset-list", .cbs = { - .cli_show = cli_show_ripng_offset_list, .create = ripngd_instance_offset_list_create, .destroy = ripngd_instance_offset_list_destroy, }, @@ -88,7 +81,6 @@ const struct frr_yang_module_info frr_ripngd_info = { { .xpath = "/frr-ripngd:ripngd/instance/passive-interface", .cbs = { - .cli_show = cli_show_ripng_passive_interface, .create = ripngd_instance_passive_interface_create, .destroy = ripngd_instance_passive_interface_destroy, }, @@ -105,7 +97,6 @@ const struct frr_yang_module_info frr_ripngd_info = { .cbs = { .modify = group_distribute_list_ipv6_modify, .destroy = group_distribute_list_ipv6_destroy, - .cli_show = group_distribute_list_ipv6_cli_show, } }, { @@ -113,7 +104,6 @@ const struct frr_yang_module_info frr_ripngd_info = { .cbs = { .modify = group_distribute_list_ipv6_modify, .destroy = group_distribute_list_ipv6_destroy, - .cli_show = group_distribute_list_ipv6_cli_show, } }, { @@ -121,7 +111,6 @@ const struct frr_yang_module_info frr_ripngd_info = { .cbs = { .modify = group_distribute_list_ipv6_modify, .destroy = group_distribute_list_ipv6_destroy, - .cli_show = group_distribute_list_ipv6_cli_show, } }, { @@ -129,14 +118,12 @@ const struct frr_yang_module_info frr_ripngd_info = { .cbs = { .modify = group_distribute_list_ipv6_modify, .destroy = group_distribute_list_ipv6_destroy, - .cli_show = group_distribute_list_ipv6_cli_show, } }, { .xpath = "/frr-ripngd:ripngd/instance/redistribute", .cbs = { .apply_finish = ripngd_instance_redistribute_apply_finish, - .cli_show = cli_show_ripng_redistribute, .create = ripngd_instance_redistribute_create, .destroy = ripngd_instance_redistribute_destroy, }, @@ -160,7 +147,6 @@ const struct frr_yang_module_info frr_ripngd_info = { .cbs = { .create = ripngd_instance_if_route_maps_if_route_map_create, .destroy = ripngd_instance_if_route_maps_if_route_map_destroy, - .cli_show = cli_show_if_route_map, } }, { @@ -180,7 +166,6 @@ const struct frr_yang_module_info frr_ripngd_info = { { .xpath = "/frr-ripngd:ripngd/instance/static-route", .cbs = { - .cli_show = cli_show_ripng_route, .create = ripngd_instance_static_route_create, .destroy = ripngd_instance_static_route_destroy, }, @@ -188,7 +173,6 @@ const struct frr_yang_module_info frr_ripngd_info = { { .xpath = "/frr-ripngd:ripngd/instance/aggregate-address", .cbs = { - .cli_show = cli_show_ripng_aggregate_address, .create = ripngd_instance_aggregate_address_create, .destroy = ripngd_instance_aggregate_address_destroy, }, @@ -197,7 +181,6 @@ const struct frr_yang_module_info frr_ripngd_info = { .xpath = "/frr-ripngd:ripngd/instance/timers", .cbs = { .apply_finish = ripngd_instance_timers_apply_finish, - .cli_show = cli_show_ripng_timers, }, }, { @@ -291,7 +274,6 @@ const struct frr_yang_module_info frr_ripngd_info = { { .xpath = "/frr-interface:lib/interface/frr-ripngd:ripng/split-horizon", .cbs = { - .cli_show = cli_show_ipv6_ripng_split_horizon, .modify = lib_interface_ripng_split_horizon_modify, }, }, diff --git a/ripngd/ripng_nb.h b/ripngd/ripng_nb.h index 12d3cd51297c..a6ac1fba076b 100644 --- a/ripngd/ripng_nb.h +++ b/ripngd/ripng_nb.h @@ -10,6 +10,7 @@ #include "northbound.h" extern const struct frr_yang_module_info frr_ripngd_info; +extern const struct frr_yang_module_info frr_ripngd_cli_info; /* Mandatory callbacks. */ int ripngd_instance_create(struct nb_cb_create_args *args); @@ -138,4 +139,6 @@ void cli_show_ipv6_ripng_split_horizon(struct vty *vty, const struct lyd_node *dnode, bool show_defaults); +extern void ripng_cli_init(void); + #endif /* _FRR_RIPNG_NB_H_ */ diff --git a/ripngd/ripng_routemap.c b/ripngd/ripng_routemap.c index b5f74be3f613..3370546d5ca6 100644 --- a/ripngd/ripng_routemap.c +++ b/ripngd/ripng_routemap.c @@ -386,7 +386,7 @@ static const struct route_map_rule_cmd route_set_tag_cmd = { void ripng_route_map_init(void) { - route_map_init(); + route_map_init_new(true); route_map_match_interface_hook(generic_match_add); route_map_no_match_interface_hook(generic_match_delete); diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c index 4c3405d7dd7e..f4dadf377df2 100644 --- a/ripngd/ripngd.c +++ b/ripngd/ripngd.c @@ -23,6 +23,7 @@ #include "lib_errors.h" #include "northbound_cli.h" #include "network.h" +#include "mgmt_be_client.h" #include "ripngd/ripngd.h" #include "ripngd/ripng_route.h" @@ -2267,43 +2268,6 @@ void ripng_ecmp_disable(struct ripng *ripng) } } -/* RIPng configuration write function. */ -static int ripng_config_write(struct vty *vty) -{ - struct ripng *ripng; - int write = 0; - - RB_FOREACH(ripng, ripng_instance_head, &ripng_instances) { - char xpath[XPATH_MAXLEN]; - struct lyd_node *dnode; - - snprintf(xpath, sizeof(xpath), - "/frr-ripngd:ripngd/instance[vrf='%s']", - ripng->vrf_name); - - dnode = yang_dnode_get(running_config->dnode, xpath); - assert(dnode); - - nb_cli_show_dnode_cmds(vty, dnode, false); - - vty_out(vty, "exit\n"); - - write = 1; - } - - return write; -} - -static int ripng_config_write(struct vty *vty); -/* RIPng node structure. */ -static struct cmd_node cmd_ripng_node = { - .name = "ripng", - .node = RIPNG_NODE, - .parent_node = CONFIG_NODE, - .prompt = "%s(config-router)# ", - .config_write = ripng_config_write, -}; - static void ripng_distribute_update(struct distribute_ctx *ctx, struct distribute *dist) { @@ -2671,8 +2635,6 @@ void ripng_vrf_init(void) { vrf_init(ripng_vrf_new, ripng_vrf_enable, ripng_vrf_disable, ripng_vrf_delete); - - vrf_cmd_init(NULL); } void ripng_vrf_terminate(void) @@ -2683,20 +2645,18 @@ void ripng_vrf_terminate(void) /* Initialize ripng structure and set commands. */ void ripng_init(void) { - /* Install RIPNG_NODE. */ - install_node(&cmd_ripng_node); - /* Install ripng commands. */ install_element(VIEW_NODE, &show_ipv6_ripng_cmd); install_element(VIEW_NODE, &show_ipv6_ripng_status_cmd); - install_default(RIPNG_NODE); - ripng_if_init(); ripng_debug_init(); + /* Enable mgmt be debug */ + mgmt_be_client_lib_vty_init(); + /* Access list install. */ - access_list_init(); + access_list_init_new(true); access_list_add_hook(ripng_distribute_update_all_wrapper); access_list_delete_hook(ripng_distribute_update_all_wrapper); @@ -2710,6 +2670,4 @@ void ripng_init(void) route_map_add_hook(ripng_routemap_update); route_map_delete_hook(ripng_routemap_update); - - if_rmap_init(RIPNG_NODE); } diff --git a/ripngd/ripngd.h b/ripngd/ripngd.h index 3a2bc0c9d37d..b4f7b4e52da7 100644 --- a/ripngd/ripngd.h +++ b/ripngd/ripngd.h @@ -432,7 +432,6 @@ extern void ripng_ecmp_change(struct ripng *ripng); extern void ripng_vrf_init(void); extern void ripng_vrf_terminate(void); -extern void ripng_cli_init(void); extern uint32_t zebra_ecmp_count; diff --git a/ripngd/subdir.am b/ripngd/subdir.am index 162426c58ca8..83e376b55530 100644 --- a/ripngd/subdir.am +++ b/ripngd/subdir.am @@ -9,7 +9,6 @@ man8 += $(MANBUILD)/frr-ripngd.8 endif ripngd_ripngd_SOURCES = \ - ripngd/ripng_cli.c \ ripngd/ripng_debug.c \ ripngd/ripng_interface.c \ ripngd/ripng_nexthop.c \ diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 6d2600cd9682..b1a53965cd66 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -2015,7 +2015,7 @@ DEFUNSH(VTYSH_MGMTD, router_rip, router_rip_cmd, "router rip [vrf NAME]", #endif /* HAVE_RIPD */ #ifdef HAVE_RIPNGD -DEFUNSH(VTYSH_RIPNGD, router_ripng, router_ripng_cmd, "router ripng [vrf NAME]", +DEFUNSH(VTYSH_MGMTD, router_ripng, router_ripng_cmd, "router ripng [vrf NAME]", ROUTER_STR "RIPng\n" VRF_CMD_HELP_STR) { vty->node = RIPNG_NODE; @@ -2559,13 +2559,13 @@ DEFUNSH(VTYSH_MGMTD, vtysh_quit_ripd, vtysh_quit_ripd_cmd, "quit", #endif /* HAVE_RIPD */ #ifdef HAVE_RIPNGD -DEFUNSH(VTYSH_RIPNGD, vtysh_exit_ripngd, vtysh_exit_ripngd_cmd, "exit", +DEFUNSH(VTYSH_MGMTD, vtysh_exit_ripngd, vtysh_exit_ripngd_cmd, "exit", "Exit current mode and down to previous mode\n") { return vtysh_exit(vty); } -DEFUNSH(VTYSH_RIPNGD, vtysh_quit_ripngd, vtysh_quit_ripngd_cmd, "quit", +DEFUNSH(VTYSH_MGMTD, vtysh_quit_ripngd, vtysh_quit_ripngd_cmd, "quit", "Exit current mode and down to previous mode\n") { return vtysh_exit_ripngd(self, vty, argc, argv); diff --git a/vtysh/vtysh.h b/vtysh/vtysh.h index 7671609e3a48..b1e914ebf759 100644 --- a/vtysh/vtysh.h +++ b/vtysh/vtysh.h @@ -53,7 +53,7 @@ extern struct event_loop *master; VTYSH_BFDD | VTYSH_BABELD | VTYSH_BGPD | VTYSH_EIGRPD | VTYSH_ISISD | \ VTYSH_FABRICD | VTYSH_LDPD | VTYSH_NHRPD | VTYSH_OSPF6D | \ VTYSH_OSPFD | VTYSH_PBRD | VTYSH_PIMD | VTYSH_PIM6D | \ - VTYSH_RIPNGD | VTYSH_VRRPD | VTYSH_ZEBRA | VTYSH_MGMTD + VTYSH_VRRPD | VTYSH_ZEBRA | VTYSH_MGMTD #define VTYSH_ACL_SHOW \ VTYSH_BFDD | VTYSH_BABELD | VTYSH_BGPD | VTYSH_EIGRPD | VTYSH_ISISD | \ VTYSH_FABRICD | VTYSH_LDPD | VTYSH_NHRPD | VTYSH_OSPF6D | \ @@ -62,15 +62,14 @@ extern struct event_loop *master; #define VTYSH_AFFMAP VTYSH_ZEBRA | VTYSH_ISISD #define VTYSH_RMAP_CONFIG \ - VTYSH_ZEBRA | VTYSH_RIPNGD | VTYSH_OSPFD | VTYSH_OSPF6D | VTYSH_BGPD | \ - VTYSH_ISISD | VTYSH_PIMD | VTYSH_EIGRPD | VTYSH_FABRICD | \ - VTYSH_MGMTD + VTYSH_ZEBRA | VTYSH_OSPFD | VTYSH_OSPF6D | VTYSH_BGPD | VTYSH_ISISD | \ + VTYSH_PIMD | VTYSH_EIGRPD | VTYSH_FABRICD | VTYSH_MGMTD #define VTYSH_RMAP_SHOW \ VTYSH_ZEBRA | VTYSH_RIPD | VTYSH_RIPNGD | VTYSH_OSPFD | VTYSH_OSPF6D | \ VTYSH_BGPD | VTYSH_ISISD | VTYSH_PIMD | VTYSH_EIGRPD | \ VTYSH_FABRICD #define VTYSH_INTERFACE_SUBSET \ - VTYSH_ZEBRA | VTYSH_RIPD | VTYSH_RIPNGD | VTYSH_OSPFD | VTYSH_OSPF6D | \ + VTYSH_ZEBRA | VTYSH_OSPFD | VTYSH_OSPF6D | \ VTYSH_ISISD | VTYSH_PIMD | VTYSH_PIM6D | VTYSH_NHRPD | \ VTYSH_EIGRPD | VTYSH_BABELD | VTYSH_PBRD | VTYSH_FABRICD | \ VTYSH_VRRPD | VTYSH_MGMTD @@ -81,7 +80,8 @@ extern struct event_loop *master; #define VTYSH_NH_GROUP VTYSH_PBRD|VTYSH_SHARPD #define VTYSH_SR VTYSH_ZEBRA|VTYSH_PATHD #define VTYSH_DPDK VTYSH_ZEBRA -#define VTYSH_MGMT_BACKEND VTYSH_RIPD | VTYSH_STATICD | VTYSH_ZEBRA +#define VTYSH_MGMT_BACKEND \ + VTYSH_RIPD | VTYSH_RIPNGD | VTYSH_STATICD | VTYSH_ZEBRA #define VTYSH_MGMT_FRONTEND VTYSH_MGMTD enum vtysh_write_integrated {