summaryrefslogtreecommitdiffstats
path: root/dhcpcd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2014-11-10 19:23:22 +0000
committerRoy Marples <roy@marples.name>2014-11-10 19:23:22 +0000
commit354ad1f0aa7e0fa894a148d6ee25dd86edf7821a (patch)
tree67e619c135e6aa213aae875a195766088ee326a5 /dhcpcd.c
parent7c176f27f81b098ed1e2a3ccf707660d5a0f74cb (diff)
downloaddhcpcd-354ad1f0aa7e0fa894a148d6ee25dd86edf7821a.tar.xz
Remove all interface timers when stopping.
Diffstat (limited to 'dhcpcd.c')
-rw-r--r--dhcpcd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/dhcpcd.c b/dhcpcd.c
index c4455b33..47f597ce 100644
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -313,13 +313,15 @@ stop_interface(struct interface *ifp)
ipv6nd_drop(ifp);
dhcp_drop(ifp, "STOP");
arp_close(ifp);
- eloop_timeout_delete(ctx->eloop, NULL, ifp);
if (ifp->options->options & DHCPCD_DEPARTED)
script_runreason(ifp, "DEPARTED");
else
script_runreason(ifp, "STOPPED");
- // Remove the interface from our list
+ /* Delete all timeouts for the interfaces */
+ eloop_q_timeout_delete(ctx->eloop, 0, NULL, ifp);
+
+ /* Remove the interface from our list */
TAILQ_REMOVE(ifp->ctx->ifaces, ifp, next);
if_free(ifp);