diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util/util_net.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/util/util_net.c b/lib/util/util_net.c index 8a9b5b1f24..9c8f5c6d47 100644 --- a/lib/util/util_net.c +++ b/lib/util/util_net.c @@ -384,16 +384,16 @@ bool is_loopback_addr(const struct sockaddr *pss) /** * Check if a struct sockaddr has an unspecified address. */ -bool is_zero_addr(const struct sockaddr *pss) +bool is_zero_addr(const struct sockaddr_storage *pss) { #if defined(HAVE_IPV6) - if (pss->sa_family == AF_INET6) { + if (pss->ss_family == AF_INET6) { const struct in6_addr *pin6 = &((const struct sockaddr_in6 *)pss)->sin6_addr; return IN6_IS_ADDR_UNSPECIFIED(pin6); } #endif - if (pss->sa_family == AF_INET) { + if (pss->ss_family == AF_INET) { const struct in_addr *pin = &((const struct sockaddr_in *)pss)->sin_addr; return is_zero_ip_v4(*pin); } |