From d85744af43406e1cdef68ecbe076fa805de8e134 Mon Sep 17 00:00:00 2001 From: David Cermak Date: Thu, 28 Nov 2024 10:06:14 +0100 Subject: [PATCH] fix(lwip): Fix DHCP lease overlow using u32 type --- components/lwip/port/include/lwipopts.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/lwip/port/include/lwipopts.h b/components/lwip/port/include/lwipopts.h index 15e2c4267b..4eb38acea8 100644 --- a/components/lwip/port/include/lwipopts.h +++ b/components/lwip/port/include/lwipopts.h @@ -394,6 +394,9 @@ extern "C" { */ #define DHCP_REQUEST_BACKOFF_SEQUENCE(state, tries) ((uint16_t)(((tries) < 5 ? 1 << (tries) : 16) * 250)) +/* Use custom DHCP timeout type to support longer lease times (with IDF coarse timer granularity) + */ +#define DHCP_TIMEOUT_SIZE_T u32_t static inline uint32_t timeout_from_offered(uint32_t lease, uint32_t min) { uint32_t timeout = lease;