From: Roy Marples Date: Mon, 8 Jun 2026 14:24:31 +0000 (+0100) Subject: DHCP: Don't really expire the lease when testing X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=025e128e0c8ddb0122014f7774fd76fb6f2dce82;p=thirdparty%2Fdhcpcd.git DHCP: Don't really expire the lease when testing --- diff --git a/src/dhcp.c b/src/dhcp.c index b9419ad8..d22a99b1 100644 --- a/src/dhcp.c +++ b/src/dhcp.c @@ -2024,8 +2024,10 @@ dhcp_expire(void *arg) state->added |= STATE_EXPIRED; } else { logerrx("%s: DHCP lease expired", ifp->name); - dhcp_drop(ifp, "EXPIRE"); - dhcp_unlink(ifp->ctx, state->leasefile); + if (!(ifp->ctx->options & DHCPCD_TEST)) { + dhcp_drop(ifp, "EXPIRE"); + dhcp_unlink(ifp->ctx, state->leasefile); + } } state->interval = 0; dhcp_discover(ifp);