Commit bed6c823 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Don't send self-updates on idle interfaces.

parent afe2935e
...@@ -994,13 +994,16 @@ send_update(struct network *net, int urgent, ...@@ -994,13 +994,16 @@ send_update(struct network *net, int urgent,
buffer_update(net, prefix, plen); buffer_update(net, prefix, plen);
} }
} else { } else {
if(!network_idle(net)) {
send_self_update(net); send_self_update(net);
if(!parasitic && !network_idle(net)) { if(!parasitic) {
debugf("Sending update to %s for any.\n", net->ifname); debugf("Sending update to %s for any.\n", net->ifname);
for(i = 0; i < numroutes; i++) for(i = 0; i < numroutes; i++)
if(routes[i].installed) if(routes[i].installed)
buffer_update(net, buffer_update(net,
routes[i].src->prefix, routes[i].src->plen); routes[i].src->prefix,
routes[i].src->plen);
}
} }
delay_jitter(&net->update_timeout, update_interval); delay_jitter(&net->update_timeout, update_interval);
} }
......
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