]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
dhcpcd: Run the STOPPED hook reason for the interface on timeout
authorRoy Marples <roy@marples.name>
Sun, 20 Oct 2019 10:14:11 +0000 (11:14 +0100)
committerRoy Marples <roy@marples.name>
Sun, 20 Oct 2019 10:14:11 +0000 (11:14 +0100)
If not in master mode.

src/dhcpcd.c

index 6ab4f8e21c2a6dff993ba1df40e8edd593f39397..1509adb07ea34621d9b4666979da620e24fba3e7 100644 (file)
@@ -186,6 +186,12 @@ handle_exit_timeout(void *arg)
        ctx = arg;
        logerrx("timed out");
        if (!(ctx->options & DHCPCD_MASTER)) {
+               struct interface *ifp;
+
+               TAILQ_FOREACH(ifp, ctx->ifaces, next) {
+                       if (ifp->active == IF_ACTIVE_USER)
+                               script_runreason(ifp, "STOPPED");
+               }
                eloop_exit(ctx->eloop, EXIT_FAILURE);
                return;
        }