]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Remove all interface timers when stopping.
authorRoy Marples <roy@marples.name>
Mon, 10 Nov 2014 19:23:22 +0000 (19:23 +0000)
committerRoy Marples <roy@marples.name>
Mon, 10 Nov 2014 19:23:22 +0000 (19:23 +0000)
dhcpcd.c

index c4455b33c8a0b8264a649903c408bd6463f4bdb9..47f597ce330a7eb2215491b4940be14f232ec02d 100644 (file)
--- 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);