diff options
author | stephen hemminger <shemminger@vyatta.com> | 2010-12-16 14:28:12 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-12-17 05:26:26 +0300 |
commit | 29ba5fed1bbd09c2cba890798c8f9eaab251401d (patch) | |
tree | b3e553db3b756b3714dcce42cd92f2e6bb266ddc /net/ipv6 | |
parent | 7d743b7e952261f4d9ee091100b6403f3ce8a2af (diff) | |
download | linux-29ba5fed1bbd09c2cba890798c8f9eaab251401d.tar.xz |
ipv6: don't flush routes when setting loopback down
When loopback device is being brought down, then keep the route table
entries because they are special. The entries in the local table for
linklocal routes and ::1 address should not be purged.
This is a sub optimal solution to the problem and should be replaced
by a better fix in future.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/addrconf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 93b7a933a775..848b35591042 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -2669,7 +2669,9 @@ static int addrconf_ifdown(struct net_device *dev, int how) ASSERT_RTNL(); - rt6_ifdown(net, dev); + /* Flush routes if device is being removed or it is not loopback */ + if (how || !(dev->flags & IFF_LOOPBACK)) + rt6_ifdown(net, dev); neigh_ifdown(&nd_tbl, dev); idev = __in6_dev_get(dev); |