]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
ipv6: Regenerate host route according to node pointer upon loopback up
authorIdo Schimmel <idosch@mellanox.com>
Thu, 3 Aug 2017 11:28:23 +0000 (13:28 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Aug 2017 22:36:00 +0000 (15:36 -0700)
commit9217d8c2fe743f02a3ce6d430fe3b5d514fd5f1c
tree1f452e1be64610e5fec55c98bec40aaff8eeb4a0
parent7483cea79957312e9f8e9cf760a1bc5d6c507113
ipv6: Regenerate host route according to node pointer upon loopback up

When the loopback device is brought back up we need to check if the host
route attached to the address is still in the FIB and regenerate one in
case it's not.

Host routes using the loopback device are always inserted into and
removed from the FIB under RTNL (under which this function is called),
so we can test their node pointer instead of the reference count in
order to check if the route is in the FIB or not.

Tested using the following script from Nicolas mentioned in
commit a220445f9f43 ("ipv6: correctly add local routes when lo goes up"):

$ ip link add dummy1 type dummy
$ ip link set dummy1 up
$ ip link set lo down ; ip link set lo up

The host route is correctly regenerated.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/addrconf.c