Commit 16c818b5 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Tweak retract_neighbour_routes.

parent 8a495801
...@@ -578,10 +578,11 @@ retract_neighbour_routes(struct neighbour *neigh) ...@@ -578,10 +578,11 @@ retract_neighbour_routes(struct neighbour *neigh)
i = 0; i = 0;
while(i < numroutes) { while(i < numroutes) {
if(routes[i].neigh == neigh) { if(routes[i].neigh == neigh) {
unsigned short oldmetric = route_metric(&routes[i]); if(routes[i].refmetric != INFINITY) {
if(oldmetric != INFINITY) { unsigned short oldmetric = route_metric(&routes[i]);
retract_route(&routes[i]); retract_route(&routes[i]);
route_changed(&routes[i], routes[i].src, oldmetric); if(oldmetric != INFINITY)
route_changed(&routes[i], routes[i].src, oldmetric);
} }
} }
i++; i++;
......
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