Skip to content

Double interface can fail DNS resolution: dns_clear_servers called twice (IDFGH-4440) #6270

Open
@arnoutdekimo

Description

Hi,

In the v4.2 but also in the 4.3-dev, the https_request_example allows in the sdkconfig to enable both ethernet and wifi. (CONFIG_EXAMPLE_CONNECT_ETHERNET and CONFIG_EXAMPLE_CONNECT_WIFI)
Both will then run a dhcp client and the example will wait until both interfaces are up and have an IP.

However, in the case that one of the two interfaces does not get a DNS server through its DHCP lease, it is possible for no DNS servers to be configured at all, causing all subsequent name resolutions to fail.

What seems to happen is that esp_netif_dhcpc_start_api is called for every interface. In this function all dns servers are cleared. If the slower interface does not restore another dns server, the system will be without any dns server, which is clearly undesired.

(Tested on ESP32-WROOM-32)

Kind regards,
Arnout

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions