diff options
author | Julian Anastasov <ja@ssi.bg> | 2015-10-30 10:23:33 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-12-09 14:34:07 -0500 |
commit | 795d2a6ddbe561cbac89bce6f54be39b72040655 (patch) | |
tree | bb63ea190cac99c11ae609e334281d5db6dc3ef4 /include | |
parent | cfb2f132a8fad8c3b81f023d3259c3964a22c471 (diff) | |
download | lwn-795d2a6ddbe561cbac89bce6f54be39b72040655.tar.gz lwn-795d2a6ddbe561cbac89bce6f54be39b72040655.zip |
ipv4: fix to not remove local route on link down
[ Upstream commit 4f823defdd5b106a5e89745ee8b163c71855de1e ]
When fib_netdev_event calls fib_disable_ip on NETDEV_DOWN event
we should not delete the local routes if the local address
is still present. The confusion comes from the fact that both
fib_netdev_event and fib_inetaddr_event use the NETDEV_DOWN
constant. Fix it by returning back the variable 'force'.
Steps to reproduce:
modprobe dummy
ifconfig dummy0 192.168.168.1 up
ifconfig dummy0 down
ip route list table local | grep dummy | grep host
local 192.168.168.1 dev dummy0 proto kernel scope host src 192.168.168.1
Fixes: 8a3d03166f19 ("net: track link-status of ipv4 nexthops")
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/ip_fib.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index 727d6e9a9685..965fa5b1a274 100644 --- a/include/net/ip_fib.h +++ b/include/net/ip_fib.h @@ -317,7 +317,7 @@ void fib_flush_external(struct net *net); /* Exported by fib_semantics.c */ int ip_fib_check_default(__be32 gw, struct net_device *dev); -int fib_sync_down_dev(struct net_device *dev, unsigned long event); +int fib_sync_down_dev(struct net_device *dev, unsigned long event, bool force); int fib_sync_down_addr(struct net *net, __be32 local); int fib_sync_up(struct net_device *dev, unsigned int nh_flags); void fib_select_multipath(struct fib_result *res); |