summaryrefslogtreecommitdiff
path: root/source3/lib/util_sock.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/util_sock.c')
-rw-r--r--source3/lib/util_sock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c
index c30f21eeb7..80d4af8cdb 100644
--- a/source3/lib/util_sock.c
+++ b/source3/lib/util_sock.c
@@ -234,7 +234,7 @@ bool is_loopback_ip_v4(struct in_addr ip)
bool is_loopback_addr(const struct sockaddr_storage *pss)
{
#if defined(HAVE_IPV6)
- if (pss->ss_family == AF_INET) {
+ if (pss->ss_family == AF_INET6) {
struct in6_addr *pin6 =
&((struct sockaddr_in6 *)pss)->sin6_addr;
return IN6_IS_ADDR_LOOPBACK(pin6);
@@ -265,7 +265,7 @@ bool is_zero_ip_v4(struct in_addr ip)
bool is_zero_addr(const struct sockaddr_storage *pss)
{
#if defined(HAVE_IPV6)
- if (pss->ss_family == AF_INET) {
+ if (pss->ss_family == AF_INET6) {
struct in6_addr *pin6 =
&((struct sockaddr_in6 *)pss)->sin6_addr;
return IN6_IS_ADDR_UNSPECIFIED(pin6);