From 2f37bf982d866dec5a78ae6d8c2ecce100be2dcb Mon Sep 17 00:00:00 2001 From: "wangtao@espressif.com" Date: Tue, 26 Aug 2025 15:09:49 +0800 Subject: [PATCH] fix(lwip): fix dhcp server set main dns issue --- components/lwip/Kconfig | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/components/lwip/Kconfig b/components/lwip/Kconfig index b9524eeaf8..2eb3348766 100644 --- a/components/lwip/Kconfig +++ b/components/lwip/Kconfig @@ -385,6 +385,20 @@ menu "LWIP" After this number is exceeded, DHCP server removes of the oldest device from it's address pool, without notification. + config LWIP_DHCPS_ADD_DNS + bool "Always add DNS option in DHCP responses" + default y + depends on LWIP_DHCPS + help + This allows the DNS option to be optional in the DHCP offers, + depending on the server's runtime configuration. + When enabled, the DHCP server will always add the DNS option to DHCP responses. + If a DNS server is not explicitly configured, the server's IP address will be used + as the fallback for the DNS option. + When disabled, the DHCP server will only include the DNS option in responses + if a DNS server has been explicitly configured. + This option will be removed in IDF v6.x + endmenu # DHCPS menuconfig LWIP_AUTOIP