From 2e3b0e548abdc44d93ce593dd549aedda889bef4 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Tue, 30 Sep 2025 17:19:43 +0100 Subject: [PATCH] When stopping all interfaces at exit and releasing, remove persistance. --- src/dhcpcd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/dhcpcd.c b/src/dhcpcd.c index 0251ee85..1037469c 100644 --- a/src/dhcpcd.c +++ b/src/dhcpcd.c @@ -1383,10 +1383,13 @@ stop_all_interfaces(struct dhcpcd_ctx *ctx, unsigned long long opts) { struct interface *ifp; - ctx->options |= DHCPCD_EXITING; + ctx->options |= opts; if (ctx->ifaces == NULL) return; + if (ctx->options & DHCPCD_RELEASE) + ctx->options &= ~DHCPCD_PERSISTENT; + /* Drop the last interface first */ TAILQ_FOREACH_REVERSE(ifp, ctx->ifaces, if_head, next) { if (!ifp->active) -- 2.47.3