summaryrefslogtreecommitdiffstats
path: root/src/ipv6nd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-01-17 16:21:37 +0000
committerRoy Marples <roy@marples.name>2020-01-17 16:21:37 +0000
commitb81f23921398ca3e736fda52c9fffea92e6cdd60 (patch)
tree98e718adcb80b067d7c2947e0401773bd25f3b29 /src/ipv6nd.c
parenta57997e20530eca62c2f932f00e9c9f6574cb43e (diff)
downloaddhcpcd-b81f23921398ca3e736fda52c9fffea92e6cdd60.tar.xz
inet6: Temporary addresses only work if prefix + ifidlen == 128
Cater for various prefix lengths when using temporay addresses.
Diffstat (limited to 'src/ipv6nd.c')
-rw-r--r--src/ipv6nd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ipv6nd.c b/src/ipv6nd.c
index 10b20ed4..c652e9ae 100644
--- a/src/ipv6nd.c
+++ b/src/ipv6nd.c
@@ -1280,7 +1280,8 @@ ipv6nd_handlera(struct dhcpcd_ctx *ctx,
#ifdef IPV6_MANAGETEMPADDR
/* RFC4941 Section 3.3.3 */
if (ap->flags & IPV6_AF_AUTOCONF &&
- ip6_use_tempaddr(ap->iface->name))
+ ip6_use_tempaddr(ap->iface->name) &&
+ ipv6_ifidlen(ap->iface) + ap->prefix_len == 128)
{
if (!new_ap) {
if (ipv6_settemptime(ap, 1) == NULL)