diff options
| author | Roy Marples <roy@marples.name> | 2016-02-14 08:17:35 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2016-02-14 08:17:35 +0000 |
| commit | 3e40f11df0808de63dd5f3463d7ce50c594a78cb (patch) | |
| tree | 52f1fe67cf5a36a703247e7221bdf4233b4e1ec3 /ipv6.c | |
| parent | 408fe75557cf974bae70d3cf4c10a63fc2b2da91 (diff) | |
| download | dhcpcd-3e40f11df0808de63dd5f3463d7ce50c594a78cb.tar.xz | |
If we handle >1 static IPv6 address, test them all before running the script.
Diffstat (limited to 'ipv6.c')
| -rw-r--r-- | ipv6.c | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -1344,8 +1344,27 @@ ipv6_staticdadcallback(void *arg) else if (!wascompleted) { logger(ia->iface->ctx, LOG_DEBUG, "%s: IPv6 static DAD completed", ia->iface->name); - script_runreason(ia->iface, "STATIC6"); } + +#define FINISHED (IPV6_AF_ADDED | IPV6_AF_DADCOMPLETED) + if (!wascompleted) { + struct interface *ifp; + struct ipv6_state *state; + + ifp = ia->iface; + state = IPV6_STATE(ifp); + TAILQ_FOREACH(ia, &state->addrs, next) { + if (ia->flags & IPV6_AF_STATIC && + (ia->flags & FINISHED) != FINISHED) + { + wascompleted = 1; + break; + } + } + if (!wascompleted) + script_runreason(ifp, "STATIC6"); + } +#undef FINISHED } ssize_t |
