mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
feat(lwip): add fall back dns config in menuconfig
Closes https://github.com/espressif/esp-idf/issues/12530
This commit is contained in:
parent
a589ecdca8
commit
75b4fb5a66
@ -656,8 +656,8 @@ menu "LWIP"
|
||||
cause Wi-Fi/Ethernet fail to release RX buffer in time.
|
||||
It is possible that all RX buffers for MAC layer are used by OOSEQ.
|
||||
|
||||
Control the number of out-of-order pbufs to ensure that the MAC layer has enough RX buffer
|
||||
to receive packets.
|
||||
Control the number of out-of-order pbufs to ensure that the MAC layer has
|
||||
enough RX buffer to receive packets.
|
||||
|
||||
In the Wi-Fi scenario, recommended OOSEQ PBUFS Range:
|
||||
0 <= TCP_OOSEQ_MAX_PBUFS <= CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM/(MAX_TCP_NUMBER + 1)
|
||||
@ -1010,6 +1010,33 @@ menu "LWIP"
|
||||
|
||||
endmenu # SNTP
|
||||
|
||||
menu "DNS"
|
||||
|
||||
config LWIP_DNS_MAX_SERVERS
|
||||
int "Maximum number of DNS servers"
|
||||
default 3
|
||||
range 1 4
|
||||
help
|
||||
Set maximum number of DNS servers.
|
||||
If fallback DNS servers are supported,
|
||||
the number of DNS servers needs to be greater than or equal to 3.
|
||||
|
||||
config LWIP_FALLBACK_DNS_SERVER_SUPPORT
|
||||
bool "Enable DNS fallback server support"
|
||||
default n
|
||||
depends on LWIP_DNS_MAX_SERVERS >= 3
|
||||
help
|
||||
Enable this feature to support DNS fallback server.
|
||||
|
||||
config LWIP_FALLBACK_DNS_SERVER_ADDRESS
|
||||
string "DNS fallback server address"
|
||||
default "114.114.114.114"
|
||||
depends on LWIP_FALLBACK_DNS_SERVER_SUPPORT
|
||||
help
|
||||
This option allows you to config dns fallback server address.
|
||||
|
||||
endmenu # DNS
|
||||
|
||||
config LWIP_ESP_LWIP_ASSERT
|
||||
bool "Enable LWIP ASSERT checks"
|
||||
default y
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 1de11efadd0083469f26c8782be3d55073829767
|
||||
Subproject commit a45be9e438f6cf9c54ec150581819c3b95d5af6b
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* SPDX-FileContributor: 2015-2021 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileContributor: 2015-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
|
||||
#ifndef __LWIPOPTS_H__
|
||||
@ -375,8 +375,16 @@ static inline uint32_t timeout_from_offered(uint32_t lease, uint32_t min)
|
||||
*/
|
||||
#define LWIP_DNS 1
|
||||
|
||||
#define DNS_MAX_SERVERS 3
|
||||
#define DNS_FALLBACK_SERVER_INDEX (DNS_MAX_SERVERS - 1)
|
||||
#define DNS_MAX_SERVERS CONFIG_LWIP_DNS_MAX_SERVERS
|
||||
#define DNS_FALLBACK_SERVER_INDEX (DNS_MAX_SERVERS - 1)
|
||||
|
||||
#ifdef CONFIG_LWIP_FALLBACK_DNS_SERVER_SUPPORT
|
||||
#define FALLBACK_DNS_SERVER_ADDRESS(address) \
|
||||
do { ip_addr_t *server_dns = address; \
|
||||
char server_ip[] = CONFIG_LWIP_FALLBACK_DNS_SERVER_ADDRESS; \
|
||||
ipaddr_aton(server_ip, server_dns); \
|
||||
} while (0)
|
||||
#endif /* CONFIG_LWIP_FALLBACK_DNS_SERVER_SUPPORT */
|
||||
|
||||
/*
|
||||
---------------------------------
|
||||
@ -1123,6 +1131,7 @@ static inline uint32_t timeout_from_offered(uint32_t lease, uint32_t min)
|
||||
#define ESP_LWIP_LOCK 1
|
||||
#define ESP_THREAD_PROTECTION 1
|
||||
#define ESP_IP_FORWARD 1
|
||||
#define ESP_LWIP_FALLBACK_DNS_PREFER_IPV4 0
|
||||
|
||||
#ifdef CONFIG_LWIP_IPV6_AUTOCONFIG
|
||||
#define ESP_IPV6_AUTOCONFIG CONFIG_LWIP_IPV6_AUTOCONFIG
|
||||
|
Loading…
Reference in New Issue
Block a user