Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WiFiSTA - method setDNS as in WiFi libraries by Arduino #8854

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

JAndrassy
Copy link
Contributor

Arduino doc: https://www.arduino.cc/reference/en/libraries/wifi/wifi.setdns/

I write about the motivation for this in the other PR

@me-no-dev
Copy link
Member

Thanks for the PR, but we will probably go another way. On our platform, the DNS servers are set for all client interfaces and are not specific to a given one, meaning, if you have ETH and WiFi together, they will use the same DNS servers for both connections. The API as such is and will be misleading.

@JAndrassy
Copy link
Contributor Author

the reason to do Arduino platform and libraries is not because it has good, clear and not confusing API

@me-no-dev
Copy link
Member

yes, now go explain that to the users who complain that we allow setting DNS to interfaces, while it actually sets it globally.

@me-no-dev me-no-dev merged commit fbfcb80 into espressif:master Nov 10, 2023
37 checks passed
@me-no-dev
Copy link
Member

merging now, will add notes about compatibility as part of the rework

@JAndrassy JAndrassy deleted the wifi_setdns branch November 11, 2023 03:58
@JAndrassy
Copy link
Contributor Author

JAndrassy commented Nov 12, 2023

On our platform, the DNS servers are set for all client interfaces and are not specific to a given one

so the DNS server returned with DHCP on some interface is added to global registry of DNS servers? even if it is in LAN like for example 192.168.0.1 which is not valid for network interfaces connected to a different LAN?

@me-no-dev
Copy link
Member

I'm not sure I understood your question clearly, but to explain slightly better:

DNS and interface addresses are not necessarily connected. DNS servers only resolve names to addresses and are expected to always return the same addresses, regardless of your local network address. Google.com will always resolve to google's servers for example. From then on, it's up to your network routing to figure out which interface to use and how to get to the resolver IP address from DNS and reach the target server. So having the same DNS is nothing bad or wrong, as long as your ESP has a way to reach the DNS IP and then the resolved IPs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants