Commit c9012f67 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Deal with find_better returning NULL in update_route_metric.

parent ab0167ef
...@@ -262,7 +262,7 @@ update_route_metric(struct route *route) ...@@ -262,7 +262,7 @@ update_route_metric(struct route *route)
if(route->installed) { if(route->installed) {
struct route *better_route; struct route *better_route;
better_route = find_best_route(route->dest); better_route = find_best_route(route->dest);
if(better_route->metric <= route->metric - 96) if(better_route && better_route->metric <= route->metric - 96)
consider_route(better_route); consider_route(better_route);
else else
send_triggered_update(route, oldmetric); send_triggered_update(route, oldmetric);
......
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