summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2014-12-07 22:45:39 +0000
committerkrw <krw@openbsd.org>2014-12-07 22:45:39 +0000
commitb628a87e658bd09506bf714274ebf2d948429e77 (patch)
tree4b3f6b73366e59a86753c39dec4c307f99393b06
parentSt is more traditionally spelled with an S (diff)
downloadwireguard-openbsd-b628a87e658bd09506bf714274ebf2d948429e77.tar.xz
wireguard-openbsd-b628a87e658bd09506bf714274ebf2d948429e77.zip
Do not move from S_PREBOOT to S_REBOOT just because link_timeout
has expired. In S_REBOOT state_reboot() assumes link is present and starts sending REQUEST/DISCOVER packets and doing the backoff dance after retry_interval expires. Stay in S_PREBOOT until link appears. Pointed out by and initial diff from Nathanael Rensen.
-rw-r--r--sbin/dhclient/dhclient.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index 14a46a75b85..7b4bdd3efc5 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.341 2014/12/07 17:01:09 krw Exp $ */
+/* $OpenBSD: dhclient.c,v 1.342 2014/12/07 22:45:39 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -656,9 +656,8 @@ state_preboot(void)
if (!ifi->linkstat) {
if (interval > config->link_timeout) {
go_daemon();
- client->state = S_REBOOTING;
set_timeout_interval(config->retry_interval,
- state_reboot);
+ state_preboot);
} else
set_timeout_interval(1, state_preboot);
}