Create new IP_IS_V4 macros and use them at instead of !IP_IS_V6 - since we now have an IPADDR_ANY_TYPE, just checking for !V6 does not mean it is V4

This commit is contained in:
Dirk Ziegelmeier
2016-04-06 22:31:31 +02:00
parent ab2c65549d
commit 309e072238
10 changed files with 23 additions and 16 deletions

View File

@@ -318,7 +318,7 @@ lwip_getaddrinfo(const char *nodename, const char *servname,
}
#if LWIP_IPV4 && LWIP_IPV6
if ((IP_IS_V6_VAL(addr) && ai_family == AF_INET) ||
(!IP_IS_V6_VAL(addr) && ai_family == AF_INET6)) {
(IP_IS_V4_VAL(addr) && ai_family == AF_INET6)) {
return EAI_NONAME;
}
#endif /* LWIP_IPV4 && LWIP_IPV6 */