sunos: filter out non-IPv4/IPv6 interfaces

Filter out anything that is not an IPv4 or IPv6 interface in
uv_interface_addresses().

PR-URL: https://github.com/libuv/libuv/pull/1387
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
Sebastian Wiedenroth 2017-06-26 23:29:00 +02:00 committed by Ben Noordhuis
parent c42a4ca372
commit 26daa99e2c

View File

@ -747,7 +747,8 @@ static int uv__ifaddr_exclude(struct ifaddrs *ent) {
return 1;
if (ent->ifa_addr == NULL)
return 1;
if (ent->ifa_addr->sa_family == PF_PACKET)
if (ent->ifa_addr->sa_family != AF_INET &&
ent->ifa_addr->sa_family != AF_INET6)
return 1;
return 0;
}