Commit acb3d768 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Factor out common code in flushupdates.

parent 7a32c1fb
...@@ -884,9 +884,7 @@ flushupdates(struct network *net) ...@@ -884,9 +884,7 @@ flushupdates(struct network *net)
really_send_update(net, myid, really_send_update(net, myid,
xroute->prefix, xroute->plen, xroute->prefix, xroute->plen,
myseqno, xroute->metric); myseqno, xroute->metric);
last_prefix = xroute->prefix; goto next;
last_plen = xroute->plen;
continue;
} }
route = find_installed_route(b[i].prefix, b[i].plen); route = find_installed_route(b[i].prefix, b[i].plen);
if(route) { if(route) {
...@@ -896,16 +894,17 @@ flushupdates(struct network *net) ...@@ -896,16 +894,17 @@ flushupdates(struct network *net)
satisfy_request(route->src->prefix, route->src->plen, satisfy_request(route->src->prefix, route->src->plen,
seqno, route->src->id, net); seqno, route->src->id, net);
if(split_horizon && net->wired && route->neigh->network == net) if(split_horizon && net->wired && route->neigh->network == net)
continue; goto next;
really_send_update(net, route->src->id, really_send_update(net, route->src->id,
route->src->prefix, route->src->prefix,
route->src->plen, route->src->plen,
seqno, metric); seqno, metric);
update_source(route->src, seqno, metric); update_source(route->src, seqno, metric);
last_prefix = route->src->prefix; goto next;
last_plen = route->src->plen;
continue;
} }
next:
last_prefix = route->src->prefix;
last_plen = route->src->plen;
} }
schedule_flush_now(net); schedule_flush_now(net);
done: done:
......
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