# HG changeset patch # User Roy Marples # Date 1590327135 -3600 # Node ID 9ea5c678d8a6266b38f60b9a817fe8c1f68058e1 # Parent b3b3fad257881cb5fa67bb6b6c850d470d8b8acc dhcpcd: Fix releasing addresses diff -r b3b3fad25788 -r 9ea5c678d8a6 src/dhcpcd.c --- a/src/dhcpcd.c Sun May 24 12:23:20 2020 +0000 +++ b/src/dhcpcd.c Sun May 24 14:32:15 2020 +0100 @@ -384,7 +384,6 @@ static void dhcpcd_drop(struct interface *ifp, int stop) { - return; #ifdef DHCP6 dhcp6_drop(ifp, stop ? NULL : "EXPIRE6"); @@ -1347,13 +1346,13 @@ ctx->options |= DHCPCD_EXITING; /* Drop the last interface first */ TAILQ_FOREACH_REVERSE(ifp, ctx->ifaces, if_head, next) { - if (ifp->active) { - ifp->options->options |= opts; - if (ifp->options->options & DHCPCD_RELEASE) - ifp->options->options &= ~DHCPCD_PERSISTENT; - ifp->options->options |= DHCPCD_EXITING; - stop_interface(ifp); - } + if (!ifp->active) + continue; + ifp->options->options |= opts; + if (ifp->options->options & DHCPCD_RELEASE) + ifp->options->options &= ~DHCPCD_PERSISTENT; + ifp->options->options |= DHCPCD_EXITING; + stop_interface(ifp); } }