From b567f95ea49ca3974aefe75e4a1b7ea9bb15e8a0 Mon Sep 17 00:00:00 2001 From: chendejin Date: Tue, 17 Jun 2025 17:06:24 +0800 Subject: [PATCH] lwip: Add IPv6 improvements, NAPT fixes, and ND6 RIO support (v5.4) [LWIP submodule changes]: git log --oneline fa4dffdf..fd432e4e nd6: add a unit test case for nd6 rio support (esp-lwip@fd432e4e) nd6: support route information option in router advertisement (esp-lwip@1adc49f9) ip6: add some unit test cases for ip6 forwarding (esp-lwip@ebabd6d7) ip6: clone the buf when forwarding a PBUF_REF packet (esp-lwip@adcd330e) napt: Fixed NULL pointer dereference in ip_napt_enable (esp-lwip@0a44efa1) napt: Added unit tests for napt (esp-lwip@865d7d0c) --- components/lwip/Kconfig | 14 ++++++++++++++ components/lwip/lwip | 2 +- components/lwip/port/include/lwipopts.h | 15 +++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/components/lwip/Kconfig b/components/lwip/Kconfig index 574025461d..4e6ea719b3 100644 --- a/components/lwip/Kconfig +++ b/components/lwip/Kconfig @@ -949,6 +949,20 @@ menu "LWIP" help Maximum number of entries in IPv6 destinations cache + config LWIP_IPV6_ND6_ROUTE_INFO_OPTION_SUPPORT + bool "Enable IPV6 ND6 route information option support" + depends on LWIP_ND6 + default n + help + Enable route information option (RIO) support in IPV6 ND6 + + config LWIP_IPV6_ND6_NUM_ROUTE_INFO + int "Max number of entries in IPv6 route information options cache" + depends on LWIP_IPV6_ND6_ROUTE_INFO_OPTION_SUPPORT + default 10 + help + Maximum number of entries in IPv6 route information options cache + menuconfig LWIP_PPP_SUPPORT bool "Enable PPP support" default n diff --git a/components/lwip/lwip b/components/lwip/lwip index fa4dffdfac..fd432e4ee2 160000 --- a/components/lwip/lwip +++ b/components/lwip/lwip @@ -1 +1 @@ -Subproject commit fa4dffdfac52587a26c1f29258376df750cf8474 +Subproject commit fd432e4ee2cfb7f7f1c7eb7227e0173412e7b84e diff --git a/components/lwip/port/include/lwipopts.h b/components/lwip/port/include/lwipopts.h index 3a7671472d..2fe3a3eb67 100644 --- a/components/lwip/port/include/lwipopts.h +++ b/components/lwip/port/include/lwipopts.h @@ -1334,6 +1334,21 @@ static inline uint32_t timeout_from_offered(uint32_t lease, uint32_t min) * LWIP_ND6_NUM_DESTINATIONS: Maximum number of entries in IPv6 destinations cache */ #define LWIP_ND6_NUM_DESTINATIONS CONFIG_LWIP_IPV6_ND6_NUM_DESTINATIONS + +/** + * LWIP_ND6_SUPPORT_RIO: Support route information options in IPv6 nd6 packets + */ +#ifdef CONFIG_LWIP_IPV6_ND6_ROUTE_INFO_OPTION_SUPPORT +#define LWIP_ND6_SUPPORT_RIO 1 +#else +#define LWIP_ND6_SUPPORT_RIO 0 +#endif + +/** + * LWIP_IPV6_ND6_NUM_ROUTE_INFO: Maximum number of entries in IPv6 route information options cache + */ +#define LWIP_ND6_NUM_ROUTES CONFIG_LWIP_IPV6_ND6_NUM_ROUTE_INFO + /* --------------------------------------- ---------- Hook options ---------------