Skip to content

Commit 2e3b0e5

Browse files
committed
When stopping all interfaces at exit and releasing, remove persistance.
1 parent 6e04833 commit 2e3b0e5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/dhcpcd.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1383,10 +1383,13 @@ stop_all_interfaces(struct dhcpcd_ctx *ctx, unsigned long long opts)
13831383
{
13841384
struct interface *ifp;
13851385

1386-
ctx->options |= DHCPCD_EXITING;
1386+
ctx->options |= opts;
13871387
if (ctx->ifaces == NULL)
13881388
return;
13891389

1390+
if (ctx->options & DHCPCD_RELEASE)
1391+
ctx->options &= ~DHCPCD_PERSISTENT;
1392+
13901393
/* Drop the last interface first */
13911394
TAILQ_FOREACH_REVERSE(ifp, ctx->ifaces, if_head, next) {
13921395
if (!ifp->active)

0 commit comments

Comments
 (0)