Skip to contentSkip to conversation

Patch "net: ipv6: Do not keep IPv6 addresses when IPv6 is disabled" has been added to the 4.7-stable tree

PATCH [email protected] 1 participant 1 message Sep 21, 2016

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

net: ipv6: Do not keep IPv6 addresses when IPv6 is disabled

to the 4.7-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
net-ipv6-do-not-keep-ipv6-addresses-when-ipv6-is-disabled.patch
and it can be found in the queue-4.7 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Wed Sep 21 10:05:18 CEST 2016

From: Mike Manning <[email protected]>
Date: Fri, 12 Aug 2016 12:02:38 +0100
Subject: net: ipv6: Do not keep IPv6 addresses when IPv6 is disabled

From: Mike Manning <[email protected]>

[ Upstream commit bc561632dddd5af0c4444d919f01cbf6d553aa0a ]

If IPv6 is disabled when the option is set to keep IPv6 addresses on link down, userspace is unaware of this as there is no such indication via netlink. The solution is to remove the IPv6 addresses in this case, which results in netlink messages indicating removal of addresses in the usual manner. This fix also makes the behavior consistent with the case of having IPv6 disabled first, which stops IPv6 addresses from being added.

Fixes f1705ec197e7 ("net: ipv6: Make address flushing on ifdown optional")
---
 net/ipv6/addrconf.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/ipv6/addrconf.c +2 -2
@@ -3469,7 +3469,7 @@ static int addrconf_ifdown(struct net_de
 	/* combine the user config with event to determine if permanent
 	 * addresses are to be removed from address hash table
 	 */
-	keep_addr = !(how || _keep_addr <= 0);
+	keep_addr = !(how || _keep_addr <= 0 || idev->cnf.disable_ipv6);
 
 	/* Step 2: clear hash table */
 	for (i = 0; i < IN6_ADDR_HSIZE; i++) {
@@ -3525,7 +3525,7 @@ restart:
 	/* re-combine the user config with event to determine if permanent
 	 * addresses are to be removed from the interface list
 	 */
-	keep_addr = (!how && _keep_addr > 0);
+	keep_addr = (!how && _keep_addr > 0 && !idev->cnf.disable_ipv6);
 
 	INIT_LIST_HEAD(&del_list);
 	list_for_each_entry_safe(ifa, tmp, &idev->addr_list, if_list) {

Patches currently in stable-queue which might be from [email protected] are

queue-4.7/net-ipv6-do-not-keep-ipv6-addresses-when-ipv6-is-disabled.patch