From 5f145fb8bdf88fa08176939eb8c5f576cd8b28de Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 5 Dec 2017 20:21:37 -0500 Subject: [PATCH] zebra: Move zebrad initialization outside of cli init The zebrad initialization does not need to be part of cli initialization and should be done separately. Signed-off-by: Donald Sharp --- zebra/main.c | 1 + zebra/zserv.c | 7 +++++-- zebra/zserv.h | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/zebra/main.c b/zebra/main.c index 36c931c4ee..872f119baf 100644 --- a/zebra/main.c +++ b/zebra/main.c @@ -295,6 +295,7 @@ int main(int argc, char **argv) zebrad.master = frr_init(); /* Zebra related initialize. */ + zserv_init(); zebra_init(); rib_init(); zebra_if_init(); diff --git a/zebra/zserv.c b/zebra/zserv.c index b6d70084c0..f0ba0eca6e 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -3298,13 +3298,16 @@ void zserv_read_file(char *input) } #endif -/* Initialisation of zebra and installation of commands. */ -void zebra_init(void) +void zserv_init(void) { /* Client list init. */ zebrad.client_list = list_new(); zebrad.client_list->del = (void (*)(void *))zebra_client_free; +} +/* Initialisation of zebra and installation of commands. */ +void zebra_init(void) +{ /* Install configuration write function. */ install_node(&table_node, config_write_table); install_node(&forwarding_node, config_write_forwarding); diff --git a/zebra/zserv.h b/zebra/zserv.h index 6077dc105a..c7466219c0 100644 --- a/zebra/zserv.h +++ b/zebra/zserv.h @@ -148,6 +148,7 @@ extern struct zebra_t zebrad; extern unsigned int multipath_num; /* Prototypes. */ +extern void zserv_init(void); extern void zebra_init(void); extern void zebra_if_init(void); extern void zebra_zserv_socket_init(char *path); -- 2.39.5