Commit 849a1f89 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Don't compute metrics larger than infinity in update_xroute_metric.

parent c9012f67
......@@ -291,7 +291,7 @@ update_xroute_metric(struct xroute *xroute, int cost)
return;
oldmetric = xroute->metric;
newmetric = gwroute->metric + cost;
newmetric = MIN(gwroute->metric + cost, INFINITY);
if(xroute->cost != cost || oldmetric != newmetric) {
xroute->cost = cost;
......
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