]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Really fix double fork.
authorRoy Marples <roy@marples.name>
Thu, 2 Oct 2014 13:38:18 +0000 (13:38 +0000)
committerRoy Marples <roy@marples.name>
Thu, 2 Oct 2014 13:38:18 +0000 (13:38 +0000)
dhcp6.c

diff --git a/dhcp6.c b/dhcp6.c
index 22b740771887740a34f4b7e760480079d23051d0..83b97402c3a477e2abb0f7e9e50be15e99326b6e 100644 (file)
--- 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",