From: Roy Marples Date: Tue, 15 Dec 2015 22:50:24 +0000 (+0000) Subject: Return if we forked or not after dhcp_bind. X-Git-Tag: v6.10.0~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e871a5b72cf604e21a8f8fc58b9eff3f01b9b2b;p=thirdparty%2Fdhcpcd.git Return if we forked or not after dhcp_bind. --- diff --git a/dhcp.c b/dhcp.c index 0060286c..274db05a 100644 --- 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); }