Commit e25c7183 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Reconsider recent routes even when their metric doesn't decrease.

This fixes a bug where we would stick to a suboptimal route if the
best route was very stable.
parent a03c9ce2
......@@ -472,11 +472,17 @@ trigger_route_change(struct route *route,
if(better_route && better_route->metric <= route->metric - 96)
consider_route(better_route);
}
if(route->installed)
send_triggered_update(route, oldsrc, oldmetric);
} else if(route->metric < oldmetric) {
consider_route(route);
return;
}
/* consider_route avoids very recent routes, so reconsider newish routes
even when their metric didn't decrease. */
if(route->metric < oldmetric || route->origtime >= now.tv_sec - 240)
consider_route(route);
}
/* We just lost the installed route to a given destination. */
......
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