]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
When stopping all interfaces at exit and releasing, remove persistance. master
authorRoy Marples <roy@marples.name>
Tue, 30 Sep 2025 16:19:43 +0000 (17:19 +0100)
committerRoy Marples <roy@marples.name>
Tue, 30 Sep 2025 16:19:43 +0000 (17:19 +0100)
src/dhcpcd.c

index 0251ee85590b52df62d2301a8fa22ef3d93cb068..1037469c37238ff841f42afe3a5c988d5b30aa19 100644 (file)
@@ -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)