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)
oldmetric = route->metric;
if(route->time < now.tv_sec - route_timeout_delay) {
newmetric = INFINITY;
route->refmetric = INFINITY;
if(oldmetric < INFINITY)
if(route->refmetric < INFINITY) {
route->seqno = (route->dest->seqno + 1) & 0xFF;
route->refmetric = INFINITY;
}
newmetric = INFINITY;
} else {
newmetric = MIN(route->refmetric + neighbour_cost(route->nexthop),
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