Skip to content

Commit a3ad618

Browse files
committed
nsapi - Fixed missing NSAPI_UNSPEC check in gethostbyname for ip literals
1 parent fa88776 commit a3ad618

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

features/netsocket/NetworkStack.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ nsapi_error_t NetworkStack::gethostbyname(const char *name, SocketAddress *addre
2626
{
2727
// check for simple ip addresses
2828
if (address->set_ip_address(name)) {
29-
if (address->get_ip_version() != version) {
29+
if (version != NSAPI_UNSPEC && address->get_ip_version() != version) {
3030
return NSAPI_ERROR_DNS_FAILURE;
3131
}
3232

0 commit comments

Comments
 (0)