[Devel] [PATCH RHEL7 COMMIT] ms/ipv6: don't disable interface if last ipv6 address is removed

Konstantin Khorenko khorenko at virtuozzo.com
Sat Feb 6 05:12:34 PST 2016


The commit is pushed to "branch-rh7-3.10.0-327.3.1-vz7.10.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.3.1.vz7.10.10
------>
commit 99de2bf9cc5be144b491a2c3edebcb7c43300d0e
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Sat Feb 6 17:12:34 2016 +0400

    ms/ipv6: don't disable interface if last ipv6 address is removed
    
    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>
    
    https://jira.sw.ru/browse/PSBM-43870
    
    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