From: Roy Marples Date: Mon, 5 Sep 2016 21:19:29 +0000 (+0000) Subject: If we need to poll for address flags, do this for tentative link-local addresses... X-Git-Tag: v6.11.4~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0cc611febe68b004bee2cadf61c946d2c41fdb5d;p=thirdparty%2Fdhcpcd.git If we need to poll for address flags, do this for tentative link-local addresses too. --- diff --git a/ipv6.c b/ipv6.c index a43301d1..4e594bb5 100644 --- a/ipv6.c +++ b/ipv6.c @@ -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);