From afbbaaf417042a093b17208f89954508fd207705 Mon Sep 17 00:00:00 2001 From: zwx Date: Tue, 14 Nov 2023 19:40:59 +0800 Subject: [PATCH] feat(lwip): support NA router farwording flag set * Update submodule: git log --oneline 4a8286ab8bcf983f22421e3d4be650837b5eb277..542ba2997f6cc14fe9c3d781bf9b0d890cd70bb1 - fix router forwarding flag set (espressif/esp-lwip@542ba299) --- components/lwip/Kconfig | 8 ++++++++ components/lwip/lwip | 2 +- components/lwip/port/include/lwipopts.h | 10 ++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/components/lwip/Kconfig b/components/lwip/Kconfig index 6fadf80b25..b4a8a28bdd 100644 --- a/components/lwip/Kconfig +++ b/components/lwip/Kconfig @@ -124,6 +124,14 @@ menu "LWIP" This option is used to disable the Network Discovery Protocol (NDP) if it is not required. Please use this option with caution, as the NDP is essential for IPv6 functionality within a local network. + config LWIP_FORCE_ROUTER_FORWARDING + bool "LWIP Force Router Forwarding Enable/Disable" + default n + depends on LWIP_ND6 + help + This option is used to set the the router flag for the NA packets. + When enabled, the router flag in NA packet will always set to 1, otherwise, never set router flag for NA packets. + config LWIP_MAX_SOCKETS int "Max number of open sockets" range 1 16 diff --git a/components/lwip/lwip b/components/lwip/lwip index 4a8286ab8b..542ba2997f 160000 --- a/components/lwip/lwip +++ b/components/lwip/lwip @@ -1 +1 @@ -Subproject commit 4a8286ab8bcf983f22421e3d4be650837b5eb277 +Subproject commit 542ba2997f6cc14fe9c3d781bf9b0d890cd70bb1 diff --git a/components/lwip/port/include/lwipopts.h b/components/lwip/port/include/lwipopts.h index 1c981f8fc4..55ce6558f8 100644 --- a/components/lwip/port/include/lwipopts.h +++ b/components/lwip/port/include/lwipopts.h @@ -1169,6 +1169,16 @@ static inline uint32_t timeout_from_offered(uint32_t lease, uint32_t min) #define LWIP_ND6 0 #endif +/** + * LWIP_FORCE_ROUTER_FORWARDING==1: the router flag in NA packet will always set to 1, + * otherwise, never set router flag for NA packets. + */ +#ifdef CONFIG_LWIP_FORCE_ROUTER_FORWARDING +#define LWIP_FORCE_ROUTER_FORWARDING 1 +#else +#define LWIP_FORCE_ROUTER_FORWARDING 0 +#endif + /** * LWIP_IPV6_NUM_ADDRESSES: Number of IPv6 addresses per netif. */