summaryrefslogtreecommitdiff
path: root/include/net/ip_fib.h
diff options
context:
space:
mode:
authorJulian Anastasov <ja@ssi.bg>2015-10-30 11:23:33 +0300
committerDavid S. Miller <davem@davemloft.net>2015-11-02 00:57:39 +0300
commit4f823defdd5b106a5e89745ee8b163c71855de1e (patch)
tree0e5c931525020e31361e2af3426f9f2d78953f00 /include/net/ip_fib.h
parent5dbebbb44a6ad94aab2cd1a46f7676f255403f64 (diff)
downloadlinux-4f823defdd5b106a5e89745ee8b163c71855de1e.tar.xz
ipv4: fix to not remove local route on link down
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>
Diffstat (limited to 'include/net/ip_fib.h')
-rw-r--r--include/net/ip_fib.h2
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);