Commit 406557eb authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Update seqno more aggressively when timing-out route.

parent 24ad92a3
...@@ -254,10 +254,11 @@ update_route_metric(struct route *route) ...@@ -254,10 +254,11 @@ update_route_metric(struct route *route)
oldmetric = route->metric; oldmetric = route->metric;
if(route->time < now.tv_sec - route_timeout_delay) { if(route->time < now.tv_sec - route_timeout_delay) {
newmetric = INFINITY; if(route->refmetric < INFINITY) {
route->refmetric = INFINITY;
if(oldmetric < INFINITY)
route->seqno = (route->dest->seqno + 1) & 0xFF; route->seqno = (route->dest->seqno + 1) & 0xFF;
route->refmetric = INFINITY;
}
newmetric = INFINITY;
} else { } else {
newmetric = MIN(route->refmetric + neighbour_cost(route->nexthop), newmetric = MIN(route->refmetric + neighbour_cost(route->nexthop),
INFINITY); INFINITY);
......
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