From: Roy Marples Date: Sat, 25 Oct 2014 09:54:11 +0000 (+0000) Subject: Reset DHCP state when carrier goes down. X-Git-Tag: v6.6.0~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86748c852ce7cbb5d0a5dbd385c48740519ad475;p=thirdparty%2Fdhcpcd.git Reset DHCP state when carrier goes down. --- diff --git a/dhcp.c b/dhcp.c index b7de69d1..4830cecc 100644 --- a/dhcp.c +++ b/dhcp.c @@ -2172,7 +2172,8 @@ dhcp_drop(struct interface *ifp, const char *reason) eloop_timeout_delete(ifp->ctx->eloop, NULL, ifp); return; } - if (state->state != DHS_IPV4LL_BOUND) { + /* Don't reset DHCP state if we have an IPv4LL address and link is up */ + if (state->state != DHS_IPV4LL_BOUND || ifp->carrier != LINK_UP) { eloop_timeout_delete(ifp->ctx->eloop, NULL, ifp); dhcp_auth_reset(&state->auth); dhcp_close(ifp);