Commit 200bed8c authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Don't call kernel_route in change_route_metric.

This is no longer needed now that we use a constant kernel priority.
parent 42d655e6
......@@ -202,25 +202,9 @@ switch_routes(struct route *old, struct route *new)
void
change_route_metric(struct route *route, unsigned newmetric)
{
int rc;
if(route->metric == newmetric)
return;
if(route->installed) {
rc = kernel_route(ROUTE_MODIFY,
route->src->prefix, route->src->plen,
route->nexthop,
route->neigh->network->ifindex,
kernel_metric,
route->nexthop,
route->neigh->network->ifindex,
kernel_metric);
if(rc < 0) {
perror("kernel_route(MODIFY)");
return;
}
}
route->metric = newmetric;
local_notify_route(route, LOCAL_CHANGE);
}
......
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