Merge pull request from ipochto/master

Fix condition check
This commit is contained in:
Tim Felgentreff 2020-04-13 22:48:49 +02:00 committed by GitHub
commit 9685d575bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -266,7 +266,7 @@ int NetSocketAddr(const Socket sock, unsigned long *ips, int maxAddr)
if (ifa->ifa_addr->sa_family != AF_INET) continue;
if (ifa->ifa_flags & IFF_LOOPBACK) continue;
if (ifa->ifa_flags & IFF_POINTOPOINT) continue;
if (ifa->ifa_flags & IFF_UP == 0) continue;
if ((ifa->ifa_flags & IFF_UP) == 0) continue;
ips[idx++] = ((struct sockaddr_in *)ifa->ifa_addr)->sin_addr.s_addr;
}
if (ifAddrStruct != NULL) {