int protocol_socket = -1; /* socket: communicate with others babeld */
static char babel_config_default[] = SYSCONFDIR BABEL_DEFAULT_CONFIG;
-static char *babel_config_file = NULL;
static char *babel_vty_addr = NULL;
static int babel_vty_port = BABEL_VTY_PORT;
ZCAP_BIND
};
-static struct zebra_privs_t babeld_privs =
+struct zebra_privs_t babeld_privs =
{
#if defined(FRR_USER)
.user = FRR_USER,
/* this replace kernel_setup && kernel_setup_socket */
babelz_zebra_init ();
- /* Get zebra configuration file. */
- vty_read_config (babel_config_file, babel_config_default);
-
/* init buffer */
rc = resize_receive_buffer(1500);
if(rc < 0)
if(fd >= 0 && rc < 0) {
zlog_err("unlink(babel-state): %s", safe_strerror(errno));
/* If we couldn't unlink it, it's probably stale. */
- close(fd);
- fd = -1;
+ goto fini;
}
if(fd >= 0) {
char buf[100];
zlog_err("Couldn't parse babel-state.");
}
}
- close(fd);
- fd = -1;
+ goto fini;
}
+fini:
+ if (fd >= 0)
+ close(fd);
+ return ;
}
static void
"id = %s\n"
"kernel_metric = %d\n",
state_file,
- babel_config_file ? babel_config_file : babel_config_default,
+ babeld_di.config_file ? babeld_di.config_file : babel_config_default,
format_address(protocol_group),
protocol_port,
babel_vty_addr ? babel_vty_addr : "None",