summaryrefslogtreecommitdiff
path: root/source4/lib/socket
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/socket')
-rw-r--r--source4/lib/socket/socket_ipv6.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/lib/socket/socket_ipv6.c b/source4/lib/socket/socket_ipv6.c
index 2384e60550..25c5ca5798 100644
--- a/source4/lib/socket/socket_ipv6.c
+++ b/source4/lib/socket/socket_ipv6.c
@@ -105,6 +105,9 @@ static NTSTATUS ipv6_tcp_connect(struct socket_context *sock,
}
srv_ip = interpret_addr6(srv_address);
+ if (memcmp(&srv_ip, &in6addr_any, sizeof(srv_ip)) == 0) {
+ return NT_STATUS_BAD_NETWORK_NAME;
+ }
ZERO_STRUCT(srv_addr);
srv_addr.sin6_addr = srv_ip;