Commit 677073fc authored by Gabriel Kerneis's avatar Gabriel Kerneis Committed by Juliusz Chroboczek

Add random-id option to config file.

parent bc621d99
......@@ -63,6 +63,7 @@ int all_wireless = 0;
int default_wireless_hello_interval = -1;
int default_wired_hello_interval = -1;
int resend_delay = -1;
int random_id = 0;
int do_daemonise = 0;
char *logfile = NULL,
*pidfile = "/var/run/babeld.pid",
......@@ -97,7 +98,7 @@ int
main(int argc, char **argv)
{
struct sockaddr_in6 sin6;
int rc, fd, i, opt, random_id = 0;
int rc, fd, i, opt;
time_t expiry_time, source_expiry_time, kernel_dump_time;
char *config_file = NULL;
void *vrc;
......
......@@ -85,6 +85,7 @@ extern int debug;
extern time_t reboot_time;
extern int default_wireless_hello_interval, default_wired_hello_interval;
extern int resend_delay;
extern int random_id;
extern int do_daemonise;
extern char *logfile, *pidfile, *state_file;
extern int link_detect;
......
......@@ -175,6 +175,11 @@ This specifies whether to keep unfeasible (useless) routes, and is
equivalent to the command-line option
.BR \-u .
.TP
.BR random-id " {" true | false }
This specifies whether to use a random router-id, and is
equivalent to the command-line option
.BR \-r .
.TP
.BI debug " level"
This specifies the debugging level, and is equivalent to the command-line
option
......
......@@ -604,6 +604,7 @@ parse_option(int c, gnc_t gnc, void *closure, char *token)
abort();
} else if(strcmp(token, "keep-unfeasible") == 0 ||
strcmp(token, "link-detect") == 0 ||
strcmp(token, "random-id") == 0 ||
strcmp(token, "daemonise") == 0) {
int b;
c = getbool(c, &b, gnc, closure);
......@@ -614,6 +615,8 @@ parse_option(int c, gnc_t gnc, void *closure, char *token)
keep_unfeasible = b;
else if(strcmp(token, "link-detect") == 0)
link_detect = b;
else if(strcmp(token, "random-id") == 0)
random_id = b;
else if(strcmp(token, "daemonise") == 0)
do_daemonise = b;
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment