summaryrefslogtreecommitdiffstats
path: root/src/dhcpcd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2019-10-20 11:14:11 +0100
committerRoy Marples <roy@marples.name>2019-10-20 11:14:11 +0100
commit12315f84852649f12b79c325e9dc8aed19a4485b (patch)
treebea39276422bf21897c9f3c777cb5a41ddbdaa0f /src/dhcpcd.c
parent4a10df2e62d898dfff65b9e3f653b665f4cae7c4 (diff)
downloaddhcpcd-12315f84852649f12b79c325e9dc8aed19a4485b.tar.xz
dhcpcd: Run the STOPPED hook reason for the interface on timeout
If not in master mode.
Diffstat (limited to 'src/dhcpcd.c')
-rw-r--r--src/dhcpcd.c6
1 files changed, 6 insertions, 0 deletions
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;
}