dect
/
linux-2.6
Archived
13
0
Fork 0

IPv6: Create temporary address if none exists.

If privacy extentions are enabled, but no current temporary address exists,
then create one when we get a router advertisement.

Signed-off-by: Glenn Wurster <gwurster@scs.carleton.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Glenn Wurster 2010-09-27 07:04:30 +00:00 committed by David S. Miller
parent ded85aa86b
commit aed65501e8
1 changed files with 3 additions and 2 deletions

View File

@ -2021,10 +2021,11 @@ ok:
ipv6_ifa_notify(0, ift);
}
if (create && in6_dev->cnf.use_tempaddr > 0) {
if ((create || list_empty(&in6_dev->tempaddr_list)) && in6_dev->cnf.use_tempaddr > 0) {
/*
* When a new public address is created as described in [ADDRCONF],
* also create a new temporary address.
* also create a new temporary address. Also create a temporary
* address if it's enabled but no temporary address currently exists.
*/
read_unlock_bh(&in6_dev->lock);
ipv6_create_tempaddr(ifp, NULL);