ipv6: remove old token ipv6 address as soon as possible
Subsystems (3)
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
@@ -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
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_verifyto clean up the old address (whichvalid_lftis 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_verifyimmediately after setting the new tokenized address to get rid of the old tokenized addresses.Cc Daniel Borkmann <[email protected]>Signed-off-by Hannes Frederic Sowa <[email protected]>
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 !
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_verifyto clean up the old address (whichvalid_lftis 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_verifyimmediately after setting the new tokenized address to get rid of the old tokenized addresses.Cc Daniel Borkmann <[email protected]>Signed-off-by Hannes Frederic Sowa <[email protected]>
Applied.