[Devel] [PATCH rh7] ipv6: don't disable interface if last ipv6 address is removed

Kirill Tkhai ktkhai at virtuozzo.com
Thu Feb 4 08:19:43 PST 2016


Port commit 876fd05ddbae03166e7037fca957b55bb3be6594 from mainstream:

The reason behind this change is that as soon as we delete
the last ipv6 address of an interface we also lose the
/proc/sys/net/ipv6/conf/<interface> directory. This seems to be a
usability problem for me.

I don't see any reason why we should shutdown ipv6 on that interface in
such cases.

Cc: YOSHIFUJI Hideaki <yoshfuji at linux-ipv6.org>
Signed-off-by: Hannes Frederic Sowa <hannes at stressinduktion.org>
Signed-off-by: David S. Miller <davem at davemloft.net>
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 net/ipv6/addrconf.c |    7 -------
 1 file changed, 7 deletions(-)

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index b3627bf..8bb298f 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -2523,13 +2523,6 @@ static int inet6_addr_del(struct net *net, int ifindex, const struct in6_addr *p
 			read_unlock_bh(&idev->lock);
 
 			ipv6_del_addr(ifp);
-
-			/* If the last address is deleted administratively,
-			   disable IPv6 on this interface.
-			 */
-			if (list_empty(&idev->addr_list))
-				addrconf_ifdown(idev->dev,
-						!(idev->dev->flags & IFF_LOOPBACK));
 			return 0;
 		}
 	}



More information about the Devel mailing list