calculate the next timeout based on the rebinding time (T2), not
renewal time (T1). At this point T1 already expired and we would wait
way too long, past the lease lifetime.
Spotted while investigating a problem reported by Zack Newman on misc@
-/* $OpenBSD: engine.c,v 1.28 2021/10/28 09:44:49 kn Exp $ */
+/* $OpenBSD: engine.c,v 1.29 2021/11/14 18:13:19 florian Exp $ */
/*
* Copyright (c) 2017, 2021 Florian Obser <florian@openbsd.org>
if (old_state == IF_RENEWING) {
iface->dhcp_server.s_addr = INADDR_ANY;
iface->timo.tv_sec = (iface->lease_time -
- iface->renewal_time) / 2; /* RFC 2131 4.4.5 */
+ iface->rebinding_time) / 2; /* RFC 2131 4.4.5 */
} else
iface->timo.tv_sec /= 2;
request_dhcp_request(iface);