summaryrefslogtreecommitdiff
path: root/sbin/dhclient/dhcpd.h
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2014-12-05 15:47:06 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2014-12-05 15:47:06 +0000
commit3102933c68a271f0c3b5bf4ab50e6229ecd384d1 (patch)
tree9014e33c463a4106a2ddd5b7e6ae95d7e36f2b56 /sbin/dhclient/dhcpd.h
parent7a578d6d316a6e71be68a75a579eeb1435831c6a (diff)
Move initial wait for network link into the state machine by adding
state S_PREBOOT and associated state_preboot() function. This results in routing socket messages being processed even while the link is being waited for. Thus the RTM_IFINFO message announcing the link is ready can be reacted to immediately, rather than waiting for the sleep(1)'ing process to wake up and look at the link state. Some interfaces seem to lose the first packet sent when the RTM_IFINFO message is reacted to so quickly, so temporarily leave in place an explicit delay before sending the first packet.
Diffstat (limited to 'sbin/dhclient/dhcpd.h')
-rw-r--r--sbin/dhclient/dhcpd.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/dhclient/dhcpd.h b/sbin/dhclient/dhcpd.h
index d0bf6e37276..50eb887592e 100644
--- a/sbin/dhclient/dhcpd.h
+++ b/sbin/dhclient/dhcpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhcpd.h,v 1.144 2014/11/23 18:22:45 krw Exp $ */
+/* $OpenBSD: dhcpd.h,v 1.145 2014/12/05 15:47:05 krw Exp $ */
/*
* Copyright (c) 2004 Henning Brauer <henning@openbsd.org>
@@ -108,6 +108,7 @@ struct client_lease {
/* Possible states in which the client can be. */
enum dhcp_state {
+ S_PREBOOT,
S_REBOOTING,
S_INIT,
S_SELECTING,