summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/dev.c b/dev.c
index 2ced495..a4f2b0e 100644
--- a/dev.c
+++ b/dev.c
@@ -82,6 +82,8 @@ static int __device_address6(const char *ifname, struct sockaddr_storage *ss)
panic("Cannot get device addresses for IPv6!\n");
for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) {
+ if (ifa->ifa_addr == NULL)
+ continue;
family = ifa->ifa_addr->sa_family;
if (family != AF_INET6)
continue;