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) ...@@ -389,7 +389,7 @@ parse_nconf(gnc_t gnc, void *closure)
} else if(strcmp(token, "hello-interval") == 0) { } else if(strcmp(token, "hello-interval") == 0) {
int interval; int interval;
c = getint(c, &interval, gnc, closure); c = getint(c, &interval, gnc, closure);
if(c < -1 || interval <= 0 || interval > 0xFFFF) if(c < -1 || interval <= 0 || interval > 10 * 0xFFFF)
goto error; goto error;
nconf->hello_interval = interval; nconf->hello_interval = interval;
} else if(strcmp(token, "wired") == 0) { } else if(strcmp(token, "wired") == 0) {
......
...@@ -30,7 +30,7 @@ struct buffered_update { ...@@ -30,7 +30,7 @@ struct buffered_update {
struct network_conf { struct network_conf {
char *ifname; char *ifname;
unsigned short cost; unsigned short cost;
unsigned short hello_interval; unsigned hello_interval;
char wired; char wired;
char split_horizon; char split_horizon;
char lq; char lq;
...@@ -77,7 +77,7 @@ struct network { ...@@ -77,7 +77,7 @@ struct network {
unsigned int bucket; unsigned int bucket;
time_t activity_time; time_t activity_time;
unsigned short hello_seqno; unsigned short hello_seqno;
unsigned short hello_interval; unsigned hello_interval;
}; };
#define NET_CONF(_net, _field) \ #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