Commit 72f344f4 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Don't limit hello intervals to 65 seconds.

The protocol allows them to go up to 650 seconds, the value in msec
cannot be a short.
parent bed6c823
......@@ -389,7 +389,7 @@ parse_nconf(gnc_t gnc, void *closure)
} else if(strcmp(token, "hello-interval") == 0) {
int interval;
c = getint(c, &interval, gnc, closure);
if(c < -1 || interval <= 0 || interval > 0xFFFF)
if(c < -1 || interval <= 0 || interval > 10 * 0xFFFF)
goto error;
nconf->hello_interval = interval;
} else if(strcmp(token, "wired") == 0) {
......
......@@ -30,7 +30,7 @@ struct buffered_update {
struct network_conf {
char *ifname;
unsigned short cost;
unsigned short hello_interval;
unsigned hello_interval;
char wired;
char split_horizon;
char lq;
......@@ -77,7 +77,7 @@ struct network {
unsigned int bucket;
time_t activity_time;
unsigned short hello_seqno;
unsigned short hello_interval;
unsigned hello_interval;
};
#define NET_CONF(_net, _field) \
......
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