• Julian Anastasov's avatar
    ipv4: fix to not remove local route on link down · 4f823def
    Julian Anastasov authored
    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: 8a3d0316 ("net: track link-status of ipv4 nexthops")
    Signed-off-by: default avatarJulian Anastasov <ja@ssi.bg>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    4f823def
ip_fib.h 8.99 KB