From ecb5370ca661668e9fa371c6293b77a2dde5cfca Mon Sep 17 00:00:00 2001 From: xiehang Date: Thu, 20 Feb 2020 14:20:53 +0800 Subject: [PATCH] lw-ip: Add option to ipv6 stateless address configuration --- components/lwip/Kconfig | 8 ++++++++ components/lwip/port/esp32/include/lwipopts.h | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/components/lwip/Kconfig b/components/lwip/Kconfig index bb6aa939d..6c8c86b17 100644 --- a/components/lwip/Kconfig +++ b/components/lwip/Kconfig @@ -240,6 +240,14 @@ config LWIP_AUTOIP_RATE_LIMIT_INTERVAL If rate limiting self-assignment requests, wait this long between each request. +config LWIP_IPV6_AUTOCONFIG + bool "Enable IPV6 stateless address autoconfiguration" + default n + help + Enabling this option allows the devices to IPV6 stateless address autoconfiguration. + + See RFC 4862. + menuconfig LWIP_NETIF_LOOPBACK bool "Support per-interface loopback" default y diff --git a/components/lwip/port/esp32/include/lwipopts.h b/components/lwip/port/esp32/include/lwipopts.h index f9ee9806c..7d48f7bdd 100644 --- a/components/lwip/port/esp32/include/lwipopts.h +++ b/components/lwip/port/esp32/include/lwipopts.h @@ -759,7 +759,6 @@ #define ESP_THREAD_SAFE_DEBUG LWIP_DBG_OFF #define ESP_DHCP 1 #define ESP_DNS 1 -#define ESP_IPV6_AUTOCONFIG 1 #define ESP_PERF 0 #define ESP_IP4_ATON 1 #define ESP_LIGHT_SLEEP 1 @@ -775,6 +774,10 @@ #define ESP_AUTO_RECV 1 #define ESP_GRATUITOUS_ARP CONFIG_ESP_GRATUITOUS_ARP +#ifdef CONFIG_LWIP_IPV6_AUTOCONFIG +#define ESP_IPV6_AUTOCONFIG CONFIG_LWIP_IPV6_AUTOCONFIG +#endif + #if CONFIG_LWIP_IRAM_OPTIMIZATION #define ESP_IRAM_ATTR IRAM_ATTR #else