summaryrefslogtreecommitdiffstats
path: root/ipv6.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2016-09-05 21:19:29 +0000
committerRoy Marples <roy@marples.name>2016-09-05 21:19:29 +0000
commit0cc611febe68b004bee2cadf61c946d2c41fdb5d (patch)
treea85ae149f4919e30c37d6be193947b480c3c178f /ipv6.c
parent41c70c8c474859124d312e2f1ef0578cfbbbf32b (diff)
downloaddhcpcd-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.c18
1 files changed, 16 insertions, 2 deletions
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);