Skip to contentSkip to conversation

ipv6: remove old token ipv6 address as soon as possible

PATCH Applied Hannes Frederic Sowa 3 participants 3 messages Jun 24, 2013 – Jun 25, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipv6: remove old token ipv6 address as soon as possible

If the tokenized ip address is re-set on an interface we depend on the arrival of a new router advertisment to call addrconf_verify to clean up the old address (which valid_lft is now set to 0). Old addresses can linger around for a longer time if e.g. the source of router advertisments vanishes.

So, call addrconf_verify immediately after setting the new tokenized address to get rid of the old tokenized addresses.

---
 net/ipv6/addrconf.c | 1 +
 1 file changed, 1 insertion(+)
net/ipv6/addrconf.c +1 -0
index 90788a1..ffc280f 100644
@@ -4363,6 +4363,7 @@ static int inet6_set_iftoken(struct inet6_dev *idev, struct in6_addr *token)
 	}
 
 	write_unlock_bh(&idev->lock);
+	addrconf_verify(0);
 	return 0;
 }
 
Signature · 1 line
1.8.1.4
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Hannes Frederic Sowa

If the tokenized ip address is re-set on an interface we depend on the arrival of a new router advertisment to call addrconf_verify to clean up the old address (which valid_lft is now set to 0). Old addresses can linger around for a longer time if e.g. the source of router advertisments vanishes.

So, call addrconf_verify immediately after setting the new tokenized address to get rid of the old tokenized addresses.

Agreed. This is also done when simply adding or modifying an address, so this would be good for tokenized addresses, too. I've tested it also and it looks good. Thanks Hannes !

maintainer Applied
#2 lore raw
In reply to Hannes Frederic Sowa

From: Hannes Frederic Sowa <[email protected]>
Date: Mon, 24 Jun 2013 22:03:28 +0200

Quoted 11 lines

If the tokenized ip address is re-set on an interface we depend on the arrival of a new router advertisment to call addrconf_verify to clean up the old address (which valid_lft is now set to 0). Old addresses can linger around for a longer time if e.g. the source of router advertisments vanishes.

So, call addrconf_verify immediately after setting the new tokenized address to get rid of the old tokenized addresses.

Applied.