]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Warn about exceeding IDGEN_RETRIES when a stable private address cannot be obtained.
authorRoy Marples <roy@marples.name>
Wed, 30 Jul 2014 09:55:32 +0000 (09:55 +0000)
committerRoy Marples <roy@marples.name>
Wed, 30 Jul 2014 09:55:32 +0000 (09:55 +0000)
ipv6nd.c

index 4965eb743ee6fa465599d039219fb4a8e582c52b..880678f81e16d574a8dd56899755aeeb29acb65e 100644 (file)
--- 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)