From 9a942e6a1b50014ac60ea4f99f31fe7df40d9407 Mon Sep 17 00:00:00 2001 From: xueyunfei Date: Wed, 26 Jul 2023 12:42:34 +0800 Subject: [PATCH] Backport some lwip bugs for 4.4 * Update submodule: git log --oneline 8290c3b8f2adaf82aa45ec992b87f16205f2689b..4f24c9baf9101634b7c690802f424b197b3bb685 Detailed description of the changes: - lower the dhcp discover and request retry backoff time (esp-lwip@4f24c9ba) - netdb:fixed bug for getaddrinfo returns null when IPV4 mapped address (esp-lwip@a4d70c7e) --- components/lwip/lwip | 2 +- components/lwip/port/esp32/include/lwipopts.h | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/components/lwip/lwip b/components/lwip/lwip index 8290c3b8f2..4f24c9baf9 160000 --- a/components/lwip/lwip +++ b/components/lwip/lwip @@ -1 +1 @@ -Subproject commit 8290c3b8f2adaf82aa45ec992b87f16205f2689b +Subproject commit 4f24c9baf9101634b7c690802f424b197b3bb685 diff --git a/components/lwip/port/esp32/include/lwipopts.h b/components/lwip/port/esp32/include/lwipopts.h index 565341c98c..eb51b9e73b 100644 --- a/components/lwip/port/esp32/include/lwipopts.h +++ b/components/lwip/port/esp32/include/lwipopts.h @@ -263,11 +263,9 @@ extern "C" #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. + * the discover and request retry backoff time from (2,4,8,16,32,60,60)s to (500m,1,2,4,4,4,4)s. */ - #define DHCP_REQUEST_TIMEOUT_SEQUENCE(state, tries) (state == DHCP_STATE_REQUESTING ? \ - (uint16_t)(1 * 1000) : \ - (uint16_t)(((tries) < 6 ? 1 << (tries) : 60) * 250)) +#define DHCP_REQUEST_TIMEOUT_SEQUENCE(tries) ((uint16_t)(((tries) < 5 ? 1 << (tries) : 16) * 250)) #define DHCP_COARSE_TIMER_SECS CONFIG_LWIP_DHCP_COARSE_TIMER_SECS