From: Roy Marples Date: Thu, 2 Oct 2014 13:38:18 +0000 (+0000) Subject: Really fix double fork. X-Git-Tag: v6.5.0~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6b56adb6674eda59340631146dcc81b709ffdc7c;p=thirdparty%2Fdhcpcd.git Really fix double fork. --- diff --git a/dhcp6.c b/dhcp6.c index 22b74077..83b97402 100644 --- a/dhcp6.c +++ b/dhcp6.c @@ -2233,12 +2233,13 @@ dhcp6_script_try_run(struct interface *ifp) { struct dhcp6_state *state; struct ipv6_addr *ap; - int completed; + int completed, valid; state = D6_STATE(ifp); if (!TAILQ_FIRST(&state->addrs)) return; + valid = 0; completed = 1; /* If all addresses have completed DAD run the script */ TAILQ_FOREACH(ap, &state->addrs, next) { @@ -2251,10 +2252,13 @@ dhcp6_script_try_run(struct interface *ifp) break; } } + if (ap->delegating_iface == NULL) + valid = 1; } if (completed) { script_runreason(ifp, state->reason); - dhcpcd_daemonise(ifp->ctx); + if (valid) + dhcpcd_daemonise(ifp->ctx); } else syslog(LOG_DEBUG, "%s: waiting for DHCPv6 DAD to complete",