diff options
| author | Roy Marples <roy@marples.name> | 2014-09-04 19:55:37 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2014-09-04 19:55:37 +0000 |
| commit | a0011b993364c6ac24e4e5e534ac07fcef2d02c3 (patch) | |
| tree | 881d45c4552b1265042d1c7a233ecbb4a0828772 /ipv6nd.c | |
| parent | 6f4828849f0f25ad9d651008c00170a2990be8ec (diff) | |
| download | dhcpcd-a0011b993364c6ac24e4e5e534ac07fcef2d02c3.tar.xz | |
Only send DHCPv6 and RA to control sockets when DAD has been completed.
Diffstat (limited to 'ipv6nd.c')
| -rw-r--r-- | ipv6nd.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -580,6 +580,24 @@ ipv6nd_addaddr(void *arg) ipv6_addaddr(ap); } +int +ipv6nd_dadcompleted(const struct interface *ifp) +{ + const struct ra *rap; + const struct ipv6_addr *ap; + + TAILQ_FOREACH(rap, ifp->ctx->ipv6->ra_routers, next) { + if (rap->iface != ifp) + continue; + TAILQ_FOREACH(ap, &rap->addrs, next) { + if (ap->flags & IPV6_AF_AUTOCONF && + !(ap->flags & IPV6_AF_DADCOMPLETED)) + return 0; + } + } + return 1; +} + static void ipv6nd_dadcallback(void *arg) { |
