git.samba.org
/
abartlet
/
samba.git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d2dbf9
)
s4-ipv6: fix the address family for IPv6 string addresses
author
Andrew Tridgell
<tridge@samba.org>
Mon, 6 Jun 2011 00:42:28 +0000
(10:42 +1000)
committer
Andrew Tridgell
<tridge@samba.org>
Mon, 6 Jun 2011 02:26:11 +0000
(12:26 +1000)
source4/lib/socket/socket.c
patch
|
blob
|
history
diff --git
a/source4/lib/socket/socket.c
b/source4/lib/socket/socket.c
index 41638b3d72f3fd7655041437f8308f06a35d0c62..369cf5ff3666986c4522054b18d811d036225f13 100644
(file)
--- a/
source4/lib/socket/socket.c
+++ b/
source4/lib/socket/socket.c
@@
-473,6
+473,11
@@
_PUBLIC_ struct socket_address *socket_address_from_strings(TALLOC_CTX *mem_ctx,
return NULL;
}
+ if (strcmp(family, "ip") == 0 && is_ipaddress_v6(host)) {
+ /* leaving as "ip" would force IPv4 */
+ family = "ipv6";
+ }
+
addr->family = family;
addr->addr = talloc_strdup(addr, host);
if (!addr->addr) {