summaryrefslogtreecommitdiffstats
path: root/dhcpcd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2016-01-11 14:02:01 +0000
committerRoy Marples <roy@marples.name>2016-01-11 14:02:01 +0000
commit1abca982ebc9c88fedeedecea29a87db5b71ba2c (patch)
tree40c700f29c8baf10bb298ae07a520d306240e132 /dhcpcd.c
parentc1642d52cba06d80691d8dd97fb994e9f0ea8916 (diff)
downloaddhcpcd-1abca982ebc9c88fedeedecea29a87db5b71ba2c.tar.xz
Only stop the interface if it's active when the interface departs.
Fixes [97eb3351d3].
Diffstat (limited to 'dhcpcd.c')
-rw-r--r--dhcpcd.c7
1 files changed, 4 insertions, 3 deletions
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;