Commit 98fb1d30 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Get value for update_interval from net->config.

parent 1e5eadb8
...@@ -275,6 +275,8 @@ network_up(struct network *net, int up) ...@@ -275,6 +275,8 @@ network_up(struct network *net, int up)
else else
net->flags &= ~NET_LQ; net->flags &= ~NET_LQ;
net->update_interval = net->update_interval =
NET_CONF(net, update_interval) > 0 ?
NET_CONF(net, update_interval) :
NET_CONF(net, hello_interval) > 0 ? NET_CONF(net, hello_interval) > 0 ?
NET_CONF(net, hello_interval) * 5 : NET_CONF(net, hello_interval) * 5 :
wired_hello_interval * 5; wired_hello_interval * 5;
...@@ -291,6 +293,8 @@ network_up(struct network *net, int up) ...@@ -291,6 +293,8 @@ network_up(struct network *net, int up)
else else
net->flags |= NET_LQ; net->flags |= NET_LQ;
net->update_interval = net->update_interval =
NET_CONF(net, update_interval) > 0 ?
NET_CONF(net, update_interval) :
NET_CONF(net, hello_interval) > 0 ? NET_CONF(net, hello_interval) > 0 ?
NET_CONF(net, hello_interval) * 5 : NET_CONF(net, hello_interval) * 5 :
wireless_hello_interval * 5; wireless_hello_interval * 5;
......
...@@ -29,8 +29,9 @@ struct buffered_update { ...@@ -29,8 +29,9 @@ struct buffered_update {
struct network_conf { struct network_conf {
char *ifname; char *ifname;
unsigned short cost;
unsigned hello_interval; unsigned hello_interval;
unsigned update_interval;
unsigned short cost;
char wired; char wired;
char split_horizon; char split_horizon;
char lq; char lq;
......
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