]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: Set nexthop flags upon carrier change
authorIdo Schimmel <idosch@mellanox.com>
Sun, 7 Jan 2018 10:45:05 +0000 (12:45 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Jan 2018 02:29:40 +0000 (21:29 -0500)
commit813fb4261bc0df78a900ed5d1d022b1f06283542
tree8e7315ee734ecd034ee4fee1059b2ff54a49578f
parenteb33ad3d1cbe5b2485279d6a46fa2022e1f2c424
ipv6: Set nexthop flags upon carrier change

Similar to IPv4, when the carrier of a netdev changes we should toggle
the 'linkdown' flag on all the nexthops using it as their nexthop
device.

This will later allow us to test for the presence of this flag during
route lookup and dump.

Up until commit 3b13acaf36dc ("net: ipv6: put host and anycast routes on
device with address") host and anycast routes used the loopback netdev
as their nexthop device and thus were not marked with the 'linkdown'
flag. The patch preserves this behavior and allows one to ping the local
address even when the nexthop device does not have a carrier and the
'ignore_routes_with_linkdown' sysctl is set.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip6_route.h
net/ipv6/addrconf.c
net/ipv6/route.c