Commit 7fe5624f authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Revert factoring of common code in flushupdates.

This was incorrect, since route might no longer be valid at that point.

rolling back:

Wed Nov  5 00:49:19 CET 2008  Juliusz Chroboczek <jch@pps.jussieu.fr>
  * Factor out common code in flushupdates.

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