feat(lwip): Add support for lwip 2.2.0-esp release

This commit is contained in:
David Cermak 2024-04-15 12:35:11 +02:00
parent 0f11052406
commit 22f213b518
5 changed files with 15 additions and 10 deletions

View File

@ -57,6 +57,7 @@ if(CONFIG_LWIP_ENABLE)
"lwip/src/core/ipv4/ip4_napt.c" "lwip/src/core/ipv4/ip4_napt.c"
"lwip/src/core/ipv4/ip4_addr.c" "lwip/src/core/ipv4/ip4_addr.c"
"lwip/src/core/ipv4/ip4_frag.c" "lwip/src/core/ipv4/ip4_frag.c"
"lwip/src/core/ipv4/acd.c"
"lwip/src/core/ipv6/dhcp6.c" "lwip/src/core/ipv6/dhcp6.c"
"lwip/src/core/ipv6/ethip6.c" "lwip/src/core/ipv6/ethip6.c"
"lwip/src/core/ipv6/icmp6.c" "lwip/src/core/ipv6/icmp6.c"

@ -1 +1 @@
Subproject commit 0606eed9d8b98a797514fdf6eabb4daf1c8c8cd9 Subproject commit 3cc917682b4d15b2539ae900e8091c8057eb6768

View File

@ -381,7 +381,7 @@ extern "C" {
/* Since for embedded devices it's not that hard to miss a discover packet, so lower /* Since for embedded devices it's not that hard to miss a discover packet, so lower
* 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. * 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(tries) ((uint16_t)(((tries) < 5 ? 1 << (tries) : 16) * 250)) #define DHCP_REQUEST_BACKOFF_SEQUENCE(state, tries) ((uint16_t)(((tries) < 5 ? 1 << (tries) : 16) * 250))
static inline uint32_t timeout_from_offered(uint32_t lease, uint32_t min) static inline uint32_t timeout_from_offered(uint32_t lease, uint32_t min)
{ {
@ -393,12 +393,12 @@ static inline uint32_t timeout_from_offered(uint32_t lease, uint32_t min)
return timeout; return timeout;
} }
#define DHCP_CALC_TIMEOUT_FROM_OFFERED_T0_LEASE(dhcp) \ #define DHCP_SET_TIMEOUT_FROM_OFFERED_T0_LEASE(tout, dhcp) do { \
timeout_from_offered((dhcp)->offered_t0_lease, 120) (tout) = timeout_from_offered((dhcp)->offered_t0_lease, 120); } while(0)
#define DHCP_CALC_TIMEOUT_FROM_OFFERED_T1_RENEW(dhcp) \ #define DHCP_SET_TIMEOUT_FROM_OFFERED_T1_RENEW(tout, dhcp) do { \
timeout_from_offered((dhcp)->offered_t1_renew, (dhcp)->t0_timeout>>1 /* 50% */ ) (tout) = timeout_from_offered((dhcp)->offered_t1_renew, (dhcp)->t0_timeout>>1 /* 50% */ ); } while(0)
#define DHCP_CALC_TIMEOUT_FROM_OFFERED_T2_REBIND(dhcp) \ #define DHCP_SET_TIMEOUT_FROM_OFFERED_T2_REBIND(tout, dhcp) do { \
timeout_from_offered((dhcp)->offered_t2_rebind, ((dhcp)->t0_timeout/8)*7 /* 87.5% */ ) (tout) = timeout_from_offered((dhcp)->offered_t2_rebind, ((dhcp)->t0_timeout/8)*7 /* 87.5% */ ); } while(0)
#define LWIP_HOOK_DHCP_PARSE_OPTION(netif, dhcp, state, msg, msg_type, option, len, pbuf, offset) \ #define LWIP_HOOK_DHCP_PARSE_OPTION(netif, dhcp, state, msg, msg_type, option, len, pbuf, offset) \
do { LWIP_UNUSED_ARG(msg); \ do { LWIP_UNUSED_ARG(msg); \
@ -692,8 +692,12 @@ static inline uint32_t timeout_from_offered(uint32_t lease, uint32_t min)
/** /**
* LWIP_NETIF_HOSTNAME==1: use DHCP_OPTION_HOSTNAME with netif's hostname * LWIP_NETIF_HOSTNAME==1: use DHCP_OPTION_HOSTNAME with netif's hostname
* field. * field.
* LWIP_DHCP_DISCOVER_ADD_HOSTNAME==1: include hostname opt in discover packets.
* If the hostname is not set in the DISCOVER packet, then some servers might issue
* an OFFER with hostname configured and consequently reject the REQUEST with any other hostname.
*/ */
#define LWIP_NETIF_HOSTNAME 1 #define LWIP_NETIF_HOSTNAME 1
#define LWIP_DHCP_DISCOVER_ADD_HOSTNAME 1
/** /**
* LWIP_NETIF_API==1: Support netif api (in netifapi.c) * LWIP_NETIF_API==1: Support netif api (in netifapi.c)

View File

@ -9,6 +9,4 @@
#include "lwip/inet.h" #include "lwip/inet.h"
#define IN6_IS_ADDR_MULTICAST(a) IN_MULTICAST(a)
#endif /* IN_H_ */ #endif /* IN_H_ */

View File

@ -24,6 +24,8 @@ components/lwip/lwip/src/include/lwip/priv/memp_std.h
components/lwip/include/lwip/sockets.h components/lwip/include/lwip/sockets.h
components/lwip/lwip/src/include/lwip/prot/nd6.h components/lwip/lwip/src/include/lwip/prot/nd6.h
components/lwip/lwip/src/include/netif/ppp/ components/lwip/lwip/src/include/netif/ppp/
components/lwip/lwip/src/include/lwip/apps/tftp_server.h
components/lwip/lwip/src/include/lwip/apps/tftp_client.h
components/spi_flash/include/spi_flash_chip_issi.h components/spi_flash/include/spi_flash_chip_issi.h
components/spi_flash/include/spi_flash_chip_mxic.h components/spi_flash/include/spi_flash_chip_mxic.h