]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ipv6: del unreachable route when an addr is deleted on lo
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Wed, 26 Sep 2012 00:04:55 +0000 (00:04 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Oct 2012 20:50:22 +0000 (05:50 +0900)
commit13d536a0bb25c10e183bc022a1b88dc097aad15d
tree412a4761b2d53b1a72d27ac28668c7e470c1c146
parent15fb2c5df65705de850c003eb23dadebc4042af6
ipv6: del unreachable route when an addr is deleted on lo

[ Upstream commit 64c6d08e6490fb18cea09bb03686c149946bd818 ]

When an address is added on loopback (ip -6 a a 2002::1/128 dev lo), two routes
are added:
 - one in the local table:
    local 2002::1 via :: dev lo  proto none  metric 0
 - one the in main table (for the prefix):
    unreachable 2002::1 dev lo  proto kernel  metric 256  error -101

When the address is deleted, the route inserted in the main table remains
because we use rt6_lookup(), which returns NULL when dst->error is set, which
is the case here! Thus, it is better to use ip6_route_lookup() to avoid this
kind of filter.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv6/addrconf.c