diff options
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r-- | net/ipv6/addrconf.c | 5 |
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); |