Skip to content

Commit

Permalink
[IPV6]: inet6_dev on loopback should be kept until namespace stop.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Denis V. Lunev authored and David S. Miller committed Apr 3, 2008
1 parent 439e238 commit eb86757
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit eb86757

Please sign in to comment.