-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
DNS client fails if two active netifs ? (IDFGH-12641) #13636
Comments
Ok I think I found the reason for this problem but no solution yet. The esp-netif layer gives the impression that DNS servers are specified per netif. (You call it with a netif as a parameter.) When querying the DNS servers after network setup, it's clear that each successful connection sets the DNS servers (that part is documented).
FYI my code currently sets up wifi first, then cell service, so it's the DNS servers of the mobile network you see. That's why my app wouldn't work : I'm on another network via WiFi so they don't respond. The netif layer calls LWIP without the netif argument (see esp_netif_set_dns_info_api()) so that's where info gets lost. Setting servers 0, 1, 2 for DNS doesn't reliably work either, see attempt results in the comments :
It's unclear to me why only one of these appears to work, and how to proceed. Should an application catch esp-netif availability and set DNS servers based on priority ? |
This is a known limitation in IDF/lwip (also documented in: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/lwip.html#adapted-apis) This will be handled on |
Answers checklist.
IDF version.
5.2.1
Espressif SoC revision.
esp32s3 (lilygo t-sim7080g s3 board)
Operating System used.
Linux
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
lilygo t-sim7080g s3 board
Power Supply used.
USB
What is the expected behavior?
With two netifs (wifi and cell) the DNS client appears to fail. Works well without activating cell netif. This log shows three dns_recv events as it should.
What is the actual behavior?
Different patterns for good/bad :
More detail from the failed run - a succeeded and a failed cal :
Steps to reproduce.
Code at https://sourceforge.net/p/lilygo-t-sim- ... webserver/
Debug Logs.
No response
More Information.
Please tell me how to figure out what's wrong
The text was updated successfully, but these errors were encountered: