summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-03-19 10:28:31 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:11:08 -0500
commit63b5ad6d5403f97423af0e8c542714ed691e667f (patch)
tree061d094ea6393ea59a886bdee78e67542972db6a /source4/lib
parentdf643022136a4b229aca817f5b57f7302a97f852 (diff)
downloadsamba-63b5ad6d5403f97423af0e8c542714ed691e667f.tar.gz
samba-63b5ad6d5403f97423af0e8c542714ed691e667f.tar.bz2
samba-63b5ad6d5403f97423af0e8c542714ed691e667f.zip
r5903: While I can't test IPv6, metze asked me to commit a matching change
for unknown hosts that I just did for IPv4. Andrew Bartlett (This used to be commit 7e1d82a200b3c679b727e0ef28a245389708ae2f)
Diffstat (limited to 'source4/lib')
-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;