diff options
| author | Roy Marples <roy@marples.name> | 2020-01-17 21:09:04 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-01-17 21:09:04 +0000 |
| commit | 524217dbe3418791f229ad08dce282fcacc624fe (patch) | |
| tree | 7999b91f540832129e01f546f38efde5f2180833 /src/ipv6nd.c | |
| parent | b895d40d8d31324824e5bcdf828a93ed3796eb7a (diff) | |
| download | dhcpcd-524217dbe3418791f229ad08dce282fcacc624fe.tar.xz | |
inet6: Check if we can try a new address on DAD failure.
Not all prefixes are autoconfable.
Diffstat (limited to 'src/ipv6nd.c')
| -rw-r--r-- | src/ipv6nd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ipv6nd.c b/src/ipv6nd.c index e755244c..82c7be84 100644 --- a/src/ipv6nd.c +++ b/src/ipv6nd.c @@ -905,7 +905,9 @@ ipv6nd_dadcallback(void *arg) * Because ap->dadcounter is always increamented, * a different address is generated. */ /* XXX Cache DAD counter per prefix/id/ssid? */ - if (ifp->options->options & DHCPCD_SLAACPRIVATE) { + if (ifp->options->options & DHCPCD_SLAACPRIVATE && + IA6_CANAUTOCONF(ia)) + { unsigned int delay; if (ia->dadcounter >= IDGEN_RETRIES) { @@ -1281,7 +1283,7 @@ ipv6nd_handlera(struct dhcpcd_ctx *ctx, /* RFC4941 Section 3.3.3 */ if (ap->flags & IPV6_AF_AUTOCONF && ip6_use_tempaddr(ap->iface->name) && - ipv6_ifidlen(ap->iface) + ap->prefix_len == 128) + IA6_CANAUTOCONF(ap)) { if (!new_ap) { if (ipv6_settemptime(ap, 1) == NULL) |
