Commit e92d41af authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Fix ordering of netlink messages when making a route unreachable.

This should fix:

  netlink_read: File exists
  netlink_read: No such process
parent 559e2f8b
......@@ -857,7 +857,7 @@ kernel_route(int operation, const unsigned char *dest, unsigned short plen,
/* It is better to add the new route before removing the old
one, to avoid losing packets. However, this only appears
to work if the metrics are different. */
if(newmetric != metric) {
if(newmetric != metric && newmetric < KERNEL_INFINITY) {
rc = kernel_route(ROUTE_ADD, dest, plen,
newgate, newifindex, newmetric,
NULL, 0, 0);
......
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