From: Roy Marples Date: Mon, 11 Jan 2016 14:02:01 +0000 (+0000) Subject: Only stop the interface if it's active when the interface departs. X-Git-Tag: v6.10.1~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1abca982ebc9c88fedeedecea29a87db5b71ba2c;p=thirdparty%2Fdhcpcd.git Only stop the interface if it's active when the interface departs. Fixes [97eb3351d3]. --- diff --git a/dhcpcd.c b/dhcpcd.c index e9e78e41..f7c6d8b6 100644 --- a/dhcpcd.c +++ b/dhcpcd.c @@ -1020,11 +1020,12 @@ dhcpcd_handleinterface(void *arg, int action, const char *ifname) errno = ESRCH; return -1; } - if (ifp->active) + if (ifp->active) { logger(ctx, LOG_DEBUG, "%s: interface departed", ifp->name); - ifp->options->options |= DHCPCD_DEPARTED; - stop_interface(ifp); + ifp->options->options |= DHCPCD_DEPARTED; + stop_interface(ifp); + } TAILQ_REMOVE(ctx->ifaces, ifp, next); if_free(ifp); return 0;