diff options
| author | Roy Marples <roy@marples.name> | 2016-09-05 21:19:29 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2016-09-05 21:19:29 +0000 |
| commit | 0cc611febe68b004bee2cadf61c946d2c41fdb5d (patch) | |
| tree | a85ae149f4919e30c37d6be193947b480c3c178f /ipv6.c | |
| parent | 41c70c8c474859124d312e2f1ef0578cfbbbf32b (diff) | |
| download | dhcpcd-0cc611febe68b004bee2cadf61c946d2c41fdb5d.tar.xz | |
If we need to poll for address flags, do this for tentative link-local addresses too.
Diffstat (limited to 'ipv6.c')
| -rw-r--r-- | ipv6.c | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -1437,14 +1437,28 @@ nextslaacprivate: static int ipv6_tryaddlinklocal(struct interface *ifp) { + struct ipv6_addr *ia; /* We can't assign a link-locak address to this, * the ppp process has to. */ if (ifp->flags & IFF_POINTOPOINT) return 0; - if (ipv6_iffindaddr(ifp, NULL, IN6_IFF_DUPLICATED) != NULL || - !CAN_ADD_LLADDR(ifp)) + ia = ipv6_iffindaddr(ifp, NULL, IN6_IFF_DUPLICATED); + if (ia != NULL) { +#ifdef IPV6_POLLADDRFLAG + if (ia->addr_flags & IN6_IFF_TENTATIVE) { + struct timespec tv; + + ms_to_ts(&tv, RETRANS_TIMER / 2); + eloop_timeout_add_tv( + ia->iface->ctx->eloop, + &tv, ipv6_checkaddrflags, ia); + } +#endif + return 0; + } + if (!CAN_ADD_LLADDR(ifp)) return 0; return ipv6_addlinklocal(ifp); |
