]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Reset DHCP state when carrier goes down.
authorRoy Marples <roy@marples.name>
Sat, 25 Oct 2014 09:54:11 +0000 (09:54 +0000)
committerRoy Marples <roy@marples.name>
Sat, 25 Oct 2014 09:54:11 +0000 (09:54 +0000)
dhcp.c

diff --git a/dhcp.c b/dhcp.c
index b7de69d19c2d6aa4ffa93868cd4480e2162481e3..4830cecc8f9745bf6932920f9a8425a80c05247d 100644 (file)
--- 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);