-
Notifications
You must be signed in to change notification settings - Fork 3k
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 failure when trying to get ip of local host #2369
Comments
Hi @adamelhakham, thanks for reporting this. This would be caused by not using DNS servers supplied by DHCP acknowledgement. This required a bit of tweaking internal to the network-socket API. I should be able to have a fix up soon. |
ARM Internal Ref: IOTMORF-448 |
Should be fixed with #2497 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When running the following code:
the message "ip is: 0.0.0.0" is printed instead of "ip is: 10.45.51.47".
I tried digging a bit deeper and found that in the following function (in DnsQuery.cpp):
static int32_t query(UDPSocket *socket, const SocketAddress &addr, const char *hostname, char *ipaddress)
it receives an answer from the DNS but failes to resolve the packet and runs the following code:
if (!resolve(packet, ipaddress)) {
delete packet;
return NSAPI_ERROR_DNS_FAILURE;
}
@jenia81
The text was updated successfully, but these errors were encountered: