summaryrefslogtreecommitdiffstats
path: root/net/ipv6/addrconf.c
diff options
context:
space:
mode:
authorDenis V. Lunev2008-04-03 22:31:53 +0200
committerDavid S. Miller2008-04-03 22:31:53 +0200
commiteb867579311a9c1e998d6911af056772c400122a (patch)
tree8f0ba1a08b34472dc8bbf1355de54e92414c5ebd /net/ipv6/addrconf.c
parent[IPV6]: Event type in addrconf_ifdown is mis-used. (diff)
downloadkernel-qcow2-linux-eb867579311a9c1e998d6911af056772c400122a.tar.gz
kernel-qcow2-linux-eb867579311a9c1e998d6911af056772c400122a.tar.xz
kernel-qcow2-linux-eb867579311a9c1e998d6911af056772c400122a.zip
[IPV6]: inet6_dev on loopback should be kept until namespace stop.
In the other case it will be destroyed when last address will be removed from lo inside a namespace. This will break IPv6 in several places. The most obvious one is ip6_dst_ifdown. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r--net/ipv6/addrconf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 4fa9da0be19a..a65935a9afd9 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -2456,7 +2456,7 @@ static int addrconf_ifdown(struct net_device *dev, int how)
ASSERT_RTNL();
- if (dev == init_net.loopback_dev && how == 1)
+ if ((dev->flags & IFF_LOOPBACK) && how == 1)
how = 0;
rt6_ifdown(dev);