Commit 746af3cf authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Fix incorrect test for clock stepping in route_smoothed_metric.

This would cause the smoothed metric to instantaneously jump to
the true metric when route_smoothed_metric was called twice in the
same second.
parent 3acb02d2
...@@ -611,7 +611,7 @@ route_smoothed_metric(struct babel_route *route) ...@@ -611,7 +611,7 @@ route_smoothed_metric(struct babel_route *route)
if(smoothing_half_life <= 0 || if(smoothing_half_life <= 0 ||
/* Protect against clock stepping. */ /* Protect against clock stepping. */
route->smoothed_metric_time >= now.tv_sec || route->smoothed_metric_time > now.tv_sec ||
route->smoothed_metric == metric) { route->smoothed_metric == metric) {
route->smoothed_metric = metric; route->smoothed_metric = metric;
route->smoothed_metric_time = now.tv_sec; route->smoothed_metric_time = now.tv_sec;
......
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