aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorGlenn Wurster <gwurster@scs.carleton.ca>2010-09-27 03:04:30 -0400
committerDavid S. Miller <davem@davemloft.net>2010-10-26 15:35:12 -0400
commitaed65501e8c072b52c5b4dc807cd938659329673 (patch)
treec604168d37323a2ca02faee256cb0d21e9ccf578 /net/ipv6
parentded85aa86bff953190cb893fceeecaadcab53a80 (diff)
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>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/addrconf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index ec7a91d9e865..8ed6763dae96 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -2021,10 +2021,11 @@ ok:
2021 ipv6_ifa_notify(0, ift); 2021 ipv6_ifa_notify(0, ift);
2022 } 2022 }
2023 2023
2024 if (create && in6_dev->cnf.use_tempaddr > 0) { 2024 if ((create || list_empty(&in6_dev->tempaddr_list)) && in6_dev->cnf.use_tempaddr > 0) {
2025 /* 2025 /*
2026 * When a new public address is created as described in [ADDRCONF], 2026 * When a new public address is created as described in [ADDRCONF],
2027 * also create a new temporary address. 2027 * also create a new temporary address. Also create a temporary
2028 * address if it's enabled but no temporary address currently exists.
2028 */ 2029 */
2029 read_unlock_bh(&in6_dev->lock); 2030 read_unlock_bh(&in6_dev->lock);
2030 ipv6_create_tempaddr(ifp, NULL); 2031 ipv6_create_tempaddr(ifp, NULL);