fix(esp_netif): Restore DNS servers per netif when setting it default

Introducing config option `CONFIG_ESP_NETIF_SET_DNS_PER_DEFAULT_NETIF`
to overcome LWIP limitation of using global DNS server info.
This config option enables LWIP callbacks to collect per netif DNS
server info and then restores global DNS servers of whichever network
interface is selected as default.

LWIP submodule update: git log --oneline aa4f6e78..3a3d1fb3
- dns: Allow storing dnsserver per netif (espressif/esp-lwip@3a3d1fb3)
This commit is contained in:
David Cermak
2024-05-21 16:57:06 +02:00
parent bbd7c5f6e2
commit 6acdb384f6
8 changed files with 130 additions and 29 deletions

View File

@@ -503,6 +503,17 @@ static inline uint32_t timeout_from_offered(uint32_t lease, uint32_t min)
#define LWIP_DNS_SUPPORT_MDNS_QUERIES 0
#endif
/**
* LWIP_DNS_SETSERVER_WITH_NETIF: If this is turned on, the dns_setserver_with_netif() is enabled and called
* from all internal modules (instead of dns_setserver()) allowing to setup a user callback to collect DNS server
* information acquired by the related network interface.
*/
#ifdef CONFIG_LWIP_DNS_SETSERVER_WITH_NETIF
#define LWIP_DNS_SETSERVER_WITH_NETIF 1
#else
#define LWIP_DNS_SETSERVER_WITH_NETIF 0
#endif
/*
---------------------------------
---------- UDP options ----------