-
Notifications
You must be signed in to change notification settings - Fork 3k
NSAPI DNS queries failing for some websites #3926
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
Comments
arm.com on Dig - https://toolbox.googleapps.com/apps/dig/#A/www.arm.com google.com on Dig - https://toolbox.googleapps.com/apps/dig/#A/www.google.com github.com also does not work, and it also appears to have a CNAME - https://toolbox.googleapps.com/apps/dig/#A/www.github.com Not sure if related |
cc @geky |
Poking around a bit the issue is coming from https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/nsapi_dns.cpp#L131 Rcode from the flags segment of the DNS response packet is 0x01, which is a DNS format error. Saw the same response when testing with the sniffer network on wireshark (although I actually did not see this error initially when using it, only on the IoT lab WIFI). Got the same error code though in this issue after testing the following day. After I started getting the error code on both networks I tested using my phone's mobile hotspot and it worked again (no error codes when running with both 'www.arm.com' and 'arm.com'). I haven't looked further into the DNS protocol aspect yet but could be related which network you're testing on. |
After more investigation it looks like this was just a result of sending a full packet (instead of sized based on the query size) and some DNS servers using the packet size instead of the count encoded in the packet. @kjbracey-arm as a pr up that should fix this: #4274 @sarahmarshy If you get a chance, can you confirm #4274 fixes this issue with your setup? |
ARM Internal Ref: MBOTRIAGE-365 |
Description
Bug
Target
K64F
Toolchain:
GCC_ARM|ARM|IAR
meed-os sha:
88a4baa Merge pull request #3902 from mazimkhan/master
Steps to reproduce
Run this simple program:
Get this output:
-3009 indicates connection to address failed. Looking deeper, it fails at the DNS resolution step.
However, if you try to connect to google.com, you get this output:
This seems to also be affecting mbed-client behavior - ARMmbed/mbed-os-example-client#205.
The text was updated successfully, but these errors were encountered: