Merge branch 'bugfix/fix_lwip_bugs_1206_v5.0' into 'release/v5.0'

lwip: fix some lwip bugs (backport v5.0)

See merge request espressif/esp-idf!21464
This commit is contained in:
Jiang Jiang Jian 2022-12-07 11:13:23 +08:00
commit 27de5e8a1b
2 changed files with 20 additions and 2 deletions

@ -1 +1 @@
Subproject commit 9bad641bc7378d2eb1ba84834baafaf119135206
Subproject commit 705dd71d46779bf29653f1f1d7b1af5a09fb2aa7

View File

@ -344,7 +344,9 @@ extern "C" {
/* 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(tries) (( (tries) < 6 ? 1 << (tries) : 60) * 250)
#define DHCP_REQUEST_TIMEOUT_SEQUENCE(state, tries) (state == DHCP_STATE_REQUESTING ? \
(uint16_t)(1 * 1000) : \
(uint16_t)(((tries) < 6 ? 1 << (tries) : 60) * 250))
static inline uint32_t timeout_from_offered(uint32_t lease, uint32_t min)
{
@ -1422,9 +1424,25 @@ static inline uint32_t timeout_from_offered(uint32_t lease, uint32_t min)
#ifdef CONFIG_LWIP_TIMERS_ONDEMAND
#define ESP_LWIP_IGMP_TIMERS_ONDEMAND 1
#define ESP_LWIP_MLD6_TIMERS_ONDEMAND 1
#define ESP_LWIP_DHCP_FINE_TIMERS_ONDEMAND 1
#define ESP_LWIP_DNS_TIMERS_ONDEMAND 1
#if IP_REASSEMBLY
#define ESP_LWIP_IP4_REASSEMBLY_TIMERS_ONDEMAND 1
#endif /* IP_REASSEMBLY */
#if LWIP_IPV6_REASS
#define ESP_LWIP_IP6_REASSEMBLY_TIMERS_ONDEMAND 1
#endif /* LWIP_IPV6_REASS */
#else
#define ESP_LWIP_IGMP_TIMERS_ONDEMAND 0
#define ESP_LWIP_MLD6_TIMERS_ONDEMAND 0
#define ESP_LWIP_DHCP_FINE_TIMERS_ONDEMAND 0
#define ESP_LWIP_DNS_TIMERS_ONDEMAND 0
#if IP_REASSEMBLY
#define ESP_LWIP_IP4_REASSEMBLY_TIMERS_ONDEMAND 0
#endif /* IP_REASSEMBLY */
#if LWIP_IPV6_REASS
#define ESP_LWIP_IP6_REASSEMBLY_TIMERS_ONDEMAND 0
#endif /* LWIP_IPV6_REASS */
#endif
/**