From: Glenn Wurster Date: Mon, 27 Sep 2010 07:04:30 +0000 (+0000) Subject: IPv6: Create temporary address if none exists. X-Git-Tag: v2.6.37-rc1~11^2~66 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aed65501e8c072b52c5b4dc807cd938659329673;p=platform%2Fkernel%2Flinux-3.10.git 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 Signed-off-by: David S. Miller --- diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index ec7a91d..8ed6763 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -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);