summaryrefslogtreecommitdiff
path: root/src/common/address.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/address.c')
-rw-r--r--src/common/address.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/address.c b/src/common/address.c
index f12f1403f2..3ffa15e1c4 100644
--- a/src/common/address.c
+++ b/src/common/address.c
@@ -1285,6 +1285,9 @@ ifaddrs_to_smartlist(const struct ifaddrs *ifa, sa_family_t family)
continue;
if (!i->ifa_addr)
continue;
+ if (i->ifa_addr->sa_family != AF_INET &&
+ i->ifa_addr->sa_family != AF_INET6)
+ continue;
if (family != AF_UNSPEC && i->ifa_addr->sa_family != family)
continue;
if (tor_addr_from_sockaddr(&tmp, i->ifa_addr, NULL) < 0)