Commit 90616166 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Use NET_CONF.

parent 3f80d35f
...@@ -261,14 +261,14 @@ network_up(struct network *net, int up) ...@@ -261,14 +261,14 @@ network_up(struct network *net, int up)
if(wired) { if(wired) {
net->flags |= NET_WIRED; net->flags |= NET_WIRED;
net->cost = net->cost = NET_CONF(net, cost, 0);
net->conf && net->conf->cost > 0 ? net->conf->cost : 96; if(net->cost <= 0) net->cost = 96;
if(split_horizon) if(split_horizon)
net->flags |= NET_SPLIT_HORIZON; net->flags |= NET_SPLIT_HORIZON;
} else { } else {
net->flags &= ~NET_WIRED; net->flags &= ~NET_WIRED;
net->cost = net->cost = NET_CONF(net, cost, 0);
net->conf && net->conf->cost > 0 ? net->conf->cost : 256; if(net->cost <= 0) net->cost = 256;
} }
update_hello_interval(net); update_hello_interval(net);
......
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