mirror of https://github.com/ARMmbed/mbed-os.git
Return localhost from NanostackInterface::get_ip_address()
For NetworkStack::gethostbyname() to properly validate the IP address version, we must return a valid address from Networkstack::get_ip_address().pull/3267/head
parent
9f8fe897d8
commit
3d5962db48
|
@ -457,8 +457,10 @@ NanostackInterface * NanostackInterface::get_stack()
|
|||
|
||||
const char * NanostackInterface::get_ip_address()
|
||||
{
|
||||
// Unsupported
|
||||
return NULL;
|
||||
// Must result a valid IPv6 address
|
||||
// For gethostbyname() to detect IP version.
|
||||
static const char localhost[] = "::";
|
||||
return localhost;
|
||||
}
|
||||
|
||||
nsapi_error_t NanostackInterface::socket_open(void **handle, nsapi_protocol_t protocol)
|
||||
|
|
Loading…
Reference in New Issue