Commit de5d2177 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Ignore EEXIST when changing a route's metric.

parent ac44c0ae
......@@ -581,7 +581,7 @@ kernel_route(int operation, const unsigned char *dest, unsigned short plen,
if(newmetric == metric)
return 0;
rc = kernel_route(ROUTE_ADD, dest, plen, gate, ifindex, newmetric, 0);
if(rc < 0)
if(rc < 0 && errno != EEXIST)
return rc;
rc = kernel_route(ROUTE_FLUSH, dest, plen, gate, ifindex, metric, 0);
return rc;
......
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