diff --git a/components/lwip/lwip b/components/lwip/lwip index 79182163e9..6fa02bd30d 160000 --- a/components/lwip/lwip +++ b/components/lwip/lwip @@ -1 +1 @@ -Subproject commit 79182163e9e77547e58a6aa34db94902b9812cb3 +Subproject commit 6fa02bd30daa656f896c7a36248253fb3b97660d diff --git a/components/lwip/port/esp32/include/lwipopts.h b/components/lwip/port/esp32/include/lwipopts.h index 151c0e3091..bbae6d4241 100644 --- a/components/lwip/port/esp32/include/lwipopts.h +++ b/components/lwip/port/esp32/include/lwipopts.h @@ -254,6 +254,14 @@ */ #define ESP_DHCP_DISABLE_VENDOR_CLASS_IDENTIFIER CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID +#define DHCP_DEFINE_CUSTOM_TIMEOUTS 1 +/* Since for embedded devices it's not that hard to miss a discover packet, so lower + * the discover retry backoff time from (2,4,8,16,32,60,60)s to (500m,1,2,4,8,15,15)s. + */ + #define DHCP_REQUEST_TIMEOUT_SEQUENCE(state, tries) (state == DHCP_STATE_REQUESTING ? \ + (uint16_t)(1 * 1000) : \ + (uint16_t)(((tries) < 6 ? 1 << (tries) : 60) * 250)) + /* ------------------------------------ ---------- AUTOIP options ----------