summaryrefslogtreecommitdiff
path: root/sbin/dhcpleased
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2021-08-04 05:56:59 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2021-08-04 05:56:59 +0000
commit281028c28e047542d772ccca8456dbcd65b776b9 (patch)
tree0164d4eaa0d575acecdc12e3ce3409cf72bd1c5a /sbin/dhcpleased
parent4c4af846ab39da9eabce2bbde528860aa7fdf6d6 (diff)
Do not enter a tight INIT -> REQUESTING -> INIT loop when the dhcp
server responds to our DHCPDISCOVER but is then slow to respond to our DHCPREQUEST. MAX_EXP_BACKOFF_FAST was introduced to get us quickly out of the REBOOTING state when we switch networks and no dhcp server would NAK our old lease but just ignore us. This is not the issue here, there is a dhcp server willing to talk to us, it's just slow. Problem reported, tested & OK jca
Diffstat (limited to 'sbin/dhcpleased')
-rw-r--r--sbin/dhcpleased/engine.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/dhcpleased/engine.c b/sbin/dhcpleased/engine.c
index 79ea38c8d22..076a57e9ba6 100644
--- a/sbin/dhcpleased/engine.c
+++ b/sbin/dhcpleased/engine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: engine.c,v 1.23 2021/08/01 09:07:03 florian Exp $ */
+/* $OpenBSD: engine.c,v 1.24 2021/08/04 05:56:58 florian Exp $ */
/*
* Copyright (c) 2017, 2021 Florian Obser <florian@openbsd.org>
@@ -1389,7 +1389,7 @@ iface_timeout(int fd, short events, void *arg)
state_transition(iface, IF_REBOOTING);
break;
case IF_REQUESTING:
- if (iface->timo.tv_sec >= MAX_EXP_BACKOFF_FAST)
+ if (iface->timo.tv_sec >= MAX_EXP_BACKOFF_SLOW)
state_transition(iface, IF_INIT);
else
state_transition(iface, IF_REQUESTING);