Commit bf93867f authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Add debugging statements.

parent 7ff85b9e
......@@ -142,6 +142,10 @@ install_route(struct route *route)
if(route->installed)
return;
if(!route_feasible(route))
fprintf(stderr, "WARNING: installing unfeasible route "
"(this shouldn't happen).");
rc = kernel_route(ROUTE_ADD, route->src->prefix, route->src->plen,
route->nexthop,
route->neigh->network->ifindex,
......@@ -192,6 +196,10 @@ switch_routes(struct route *old, struct route *new)
if(!old->installed)
return;
if(!route_feasible(new))
fprintf(stderr, "WARNING: switching to unfeasible route "
"(this shouldn't happen).");
rc = kernel_route(ROUTE_MODIFY, old->src->prefix, old->src->plen,
old->nexthop, old->neigh->network->ifindex,
metric_to_kernel(old->metric),
......
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