From fd89860f67834a31e3d78eba966155ff059d2369 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Wed, 30 Jul 2014 09:55:32 +0000 Subject: [PATCH] Warn about exceeding IDGEN_RETRIES when a stable private address cannot be obtained. --- ipv6nd.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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) -- 2.47.3