Commit 0560d779 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Revert new ordering for route retractions.

That's not the issue -- the issue is with the kernel dropping routes when
we loose an IP address.

rolling back:

Fri Mar  4 21:26:15 CET 2011  Juliusz Chroboczek <jch@pps.jussieu.fr>
  * Fix ordering of netlink messages when making a route unreachable.

  This should fix:

    netlink_read: File exists
    netlink_read: No such process

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