summaryrefslogtreecommitdiffstats
path: root/ipv6nd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2014-07-30 09:55:32 +0000
committerRoy Marples <roy@marples.name>2014-07-30 09:55:32 +0000
commitfd89860f67834a31e3d78eba966155ff059d2369 (patch)
treed87d128639476a3ec2c627bcd2250de86dba6518 /ipv6nd.c
parent5c9c7e301b255b6007d394cac21a5cdca4177d03 (diff)
downloaddhcpcd-fd89860f67834a31e3d78eba966155ff059d2369.tar.xz
Warn about exceeding IDGEN_RETRIES when a stable private address cannot be obtained.
Diffstat (limited to 'ipv6nd.c')
-rw-r--r--ipv6nd.c12
1 files 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)