-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Description
When running the following code:
EthernetInterface ifaceHandler;
char address[] = "prov-dev.kfn.arm.com";//" this is a local host, running in ARM network with IP 10.45.51.47"
uint16_t port = 5683;
SocketAddress *addr;
const char *ipGet;
ifaceHandler.connect();
addr = new SocketAddress(&ifaceHandler, address, port);
ipGet = addr->get_ip_address();
printf("ip is: %s\n", ipGet);
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;
}
- note that on public hosts everything works correctly.
Metadata
Metadata
Assignees
Labels
No labels