From: Roy Marples Date: Wed, 30 Jul 2014 09:55:32 +0000 (+0000) Subject: Warn about exceeding IDGEN_RETRIES when a stable private address cannot be obtained. X-Git-Tag: v6.4.3~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fd89860f67834a31e3d78eba966155ff059d2369;p=thirdparty%2Fdhcpcd.git Warn about exceeding IDGEN_RETRIES when a stable private address cannot be obtained. --- diff --git a/ipv6nd.c b/ipv6nd.c index 4965eb74..880678f8 100644 --- a/ipv6nd.c +++ b/ipv6nd.c @@ -603,9 +603,14 @@ ipv6nd_dadcallback(void *arg) * Because ap->dadcounter is always increamented, * a different address is generated. */ /* XXX Cache DAD counter per prefix/id/ssid? */ - if (ifp->options->options & DHCPCD_SLAACPRIVATE && - ap->dadcounter < IDGEN_RETRIES) - { + if (ifp->options->options & DHCPCD_SLAACPRIVATE) { + if (ap->dadcounter >= IDGEN_RETRIES) { + syslog(LOG_ERR, + "%s: unable to obtain a" + " stable private address", + ifp->name); + goto try_script; + } syslog(LOG_INFO, "%s: deleting address %s", ifp->name, ap->saddr); if (if_deladdress6(ap) == -1 && @@ -642,6 +647,7 @@ ipv6nd_dadcallback(void *arg) } } +try_script: if (!wascompleted) { TAILQ_FOREACH(rap, ifp->ctx->ipv6->ra_routers, next) { if (rap->iface != ifp)