]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Return if we forked or not after dhcp_bind.
authorRoy Marples <roy@marples.name>
Tue, 15 Dec 2015 22:50:24 +0000 (22:50 +0000)
committerRoy Marples <roy@marples.name>
Tue, 15 Dec 2015 22:50:24 +0000 (22:50 +0000)
dhcp.c

diff --git a/dhcp.c b/dhcp.c
index 0060286c0a01ce60c540ee913f91748f99e9958b..274db05a14c269179e761818ecb8f831a3b4dacd 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -1931,7 +1931,11 @@ dhcp_arp_probed(struct arp_state *astate)
                state->new = oldnew;
        }
 #endif
-               
+
+       /* If we forked, stop here. */
+       if (astate->iface->ctx->options & DHCPCD_FORKED)
+               return;
+
        arp_announce(astate);
 
        /* Stop IPv4LL now we have a working DHCP address */
@@ -2135,6 +2139,9 @@ dhcp_timeout(void *arg)
        struct dhcp_state *state = D_STATE(ifp);
 
        dhcp_bind(ifp);
+       /* If we forked, stop here. */
+       if (ifp->ctx->options & DHCPCD_FORKED)
+               return;
        state->interval = 0;
        dhcp_discover(ifp);
 }