Mercurial > hg > dhcpcd
changeset 5266:9ea5c678d8a6 draft
dhcpcd: Fix releasing addresses
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Sun, 24 May 2020 14:32:15 +0100 |
| parents | b3b3fad25788 |
| children | 95976721c27d |
| files | src/dhcpcd.c |
| diffstat | 1 files changed, 7 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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); } }
