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 <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2017-12-05 20:21:37 -05:00
parent 0c08a0b87b
commit 5f145fb8bd
3 changed files with 7 additions and 2 deletions

View File

@ -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();

View File

@ -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);

View File

@ -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);