Commit e7c26252 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Minor fixes to xroute handling.

Thanks to Matthieu Boutier.
parent a24bc5e0
...@@ -169,10 +169,8 @@ check_xroutes(int send_updates) ...@@ -169,10 +169,8 @@ check_xroutes(int send_updates)
memcmp(xroutes[i].prefix, routes[j].prefix, 16) == 0 && memcmp(xroutes[i].prefix, routes[j].prefix, 16) == 0 &&
xroutes[i].ifindex == routes[j].ifindex && xroutes[i].ifindex == routes[j].ifindex &&
xroutes[i].proto == routes[j].proto) { xroutes[i].proto == routes[j].proto) {
if(metric < INFINITY) { export = 1;
export = 1; break;
break;
}
} }
} }
} }
...@@ -206,7 +204,7 @@ check_xroutes(int send_updates) ...@@ -206,7 +204,7 @@ check_xroutes(int send_updates)
if(metric < INFINITY) { if(metric < INFINITY) {
rc = add_xroute(routes[i].prefix, routes[i].plen, rc = add_xroute(routes[i].prefix, routes[i].plen,
metric, routes[i].ifindex, routes[i].proto); metric, routes[i].ifindex, routes[i].proto);
if(rc) { if(rc > 0) {
struct route *route; struct route *route;
route = find_installed_route(routes[i].prefix, routes[i].plen); route = find_installed_route(routes[i].prefix, routes[i].plen);
if(route) { if(route) {
......
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