summaryrefslogtreecommitdiff
path: root/sbin/dhclient
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2018-02-09 23:23:03 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2018-02-09 23:23:03 +0000
commit3aacaac95ff5280423fdb31fcf5fc4e27079cda5 (patch)
tree00770fcf7e6eb01a06e157b9c88b18b85adee963 /sbin/dhclient
parentd6478edad60bb262d6f85b906dfcea71dbcbf473 (diff)
If there is no link after link_timeout seconds don't forget
to go_daemon() while waiting for the RTM_IFINFO message. Problem spotted by Holger Mikolon.
Diffstat (limited to 'sbin/dhclient')
-rw-r--r--sbin/dhclient/dhclient.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index d5c3ad5197f..7f176211630 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.561 2018/02/08 08:22:31 krw Exp $ */
+/* $OpenBSD: dhclient.c,v 1.562 2018/02/09 23:23:02 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -707,9 +707,10 @@ state_preboot(struct interface_info *ifi)
state_reboot(ifi);
} else {
tick_msg("link", 0, tickstart, tickstop);
- if (cur_time > tickstop)
+ if (cur_time > tickstop) {
+ go_daemon();
cancel_timeout(ifi); /* Wait for RTM_IFINFO. */
- else
+ } else
set_timeout(ifi, 1, state_preboot);
}
}