From 26daa99e2c93db2692933e8d141e44661a444e68 Mon Sep 17 00:00:00 2001 From: Sebastian Wiedenroth Date: Mon, 26 Jun 2017 23:29:00 +0200 Subject: [PATCH] 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 --- src/unix/sunos.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/unix/sunos.c b/src/unix/sunos.c index 2dc02ae4..49de5a7f 100644 --- a/src/unix/sunos.c +++ b/src/unix/sunos.c @@ -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; }