From: Roy Marples Date: Sun, 20 Oct 2019 10:14:11 +0000 (+0100) Subject: dhcpcd: Run the STOPPED hook reason for the interface on timeout X-Git-Tag: v8.1.2~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b73ec9365c1c5db527c93fa9c2d0199da32e00a2;p=thirdparty%2Fdhcpcd.git dhcpcd: Run the STOPPED hook reason for the interface on timeout If not in master mode. --- diff --git a/src/dhcpcd.c b/src/dhcpcd.c index 6ab4f8e2..1509adb0 100644 --- a/src/dhcpcd.c +++ b/src/dhcpcd.c @@ -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; }