diff options
| author | Christian Hopps <chopps@labn.net> | 2024-01-19 16:40:12 +0000 |
|---|---|---|
| committer | Christian Hopps <chopps@labn.net> | 2024-01-26 12:34:46 -0500 |
| commit | 83abe9c3cb9acd610dcdf8341374428df5ea9093 (patch) | |
| tree | a55b83177da6b9f0ef907e4d8c5d97b61e6e61f5 /ripd/rip_main.c | |
| parent | d79ca934eb4c8084324ae8a570fc68d2b861b47d (diff) | |
ripd: ripd convert to mgmtd
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'ripd/rip_main.c')
| -rw-r--r-- | ripd/rip_main.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/ripd/rip_main.c b/ripd/rip_main.c index cb23098a7e..c86caabaf1 100644 --- a/ripd/rip_main.c +++ b/ripd/rip_main.c @@ -22,6 +22,7 @@ #include "libfrr.h" #include "routemap.h" #include "bfd.h" +#include "mgmt_be_client.h" #include "ripd/ripd.h" #include "ripd/rip_bfd.h" @@ -53,6 +54,8 @@ struct zebra_privs_t ripd_privs = { /* Master of threads. */ struct event_loop *master; +struct mgmt_be_client *mgmt_be_client; + static struct frr_daemon_info ripd_di; /* SIGHUP handler. */ @@ -73,6 +76,11 @@ static void sigint(void) bfd_protocol_integration_set_shutdown(true); + + 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; @@ -133,6 +141,9 @@ FRR_DAEMON_INFO(ripd, RIP, .vty_port = RIP_VTY_PORT, .privs = &ripd_privs, .yang_modules = ripd_yang_modules, .n_yang_modules = array_size(ripd_yang_modules), + + /* mgmtd will load the per-daemon config file now */ + .flags = FRR_NO_SPLIT_CONFIG, ); #define DEPRECATED_OPTIONS "" @@ -179,7 +190,9 @@ int main(int argc, char **argv) /* RIP related initialization. */ rip_init(); rip_if_init(); - rip_cli_init(); + + mgmt_be_client = mgmt_be_client_create("ripd", NULL, 0, master); + rip_zclient_init(master); rip_bfd_init(master); |
