From 201df702da64a22d9a750bd9acd78e4fd18d5a2a Mon Sep 17 00:00:00 2001 From: Amitesh Singh Date: Sun, 5 Feb 2023 19:26:55 +0530 Subject: [PATCH] feat(lwip/config): add menuconfig option for setting LWIP_IPV6_DUP_DETECT_ATTEMPTS In my network, ipv6 address allocation to esp32 was unreliable. I'd to disable LWIP_IPV6_DUP_DETECT_ATTEMPTS to 0 to actually make esp32 ipv6 address assignment work reliably. Signed-off-by: Amitesh Singh --- components/lwip/Kconfig | 8 ++++++++ components/lwip/port/include/lwipopts.h | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/components/lwip/Kconfig b/components/lwip/Kconfig index ecf53f8c80..fb8de2ab5d 100644 --- a/components/lwip/Kconfig +++ b/components/lwip/Kconfig @@ -239,6 +239,14 @@ menu "LWIP" help Set the maximum amount of pbufs waiting to be reassembled. + config LWIP_IPV6_DUP_DETECT_ATTEMPTS + int "Number of duplicate address detection attempts" + range 0 7 + default 1 + depends on LWIP_IPV6 + help + Set the number of duplicate address detection attempts. + config LWIP_IP_FORWARD bool "Enable IP forwarding" default n diff --git a/components/lwip/port/include/lwipopts.h b/components/lwip/port/include/lwipopts.h index b3c9df8d86..1d5fedc1f1 100644 --- a/components/lwip/port/include/lwipopts.h +++ b/components/lwip/port/include/lwipopts.h @@ -1327,6 +1327,12 @@ 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_IPV6_DUP_DETECT_ATTEMPTS: Number of duplicate address detection attempts + */ +#define LWIP_IPV6_DUP_DETECT_ATTEMPTS CONFIG_LWIP_IPV6_DUP_DETECT_ATTEMPTS + /* --------------------------------------- ---------- Hook options ---------------