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.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/lib/socket/socket_ipv6.c b/source4/lib/socket/socket_ipv6.c
index 3e987b4306..7c349a4cdb 100644
--- a/source4/lib/socket/socket_ipv6.c
+++ b/source4/lib/socket/socket_ipv6.c
@@ -28,7 +28,11 @@ static struct in6_addr interpret_addr6(const char *name)
struct hostent *he;
if (name == NULL) return in6addr_any;
-
+
+ if (strcasecmp(name, "localhost") == 0) {
+ name = "::1";
+ }
+
he = gethostbyname2(name, PF_INET6);
if (he == NULL) return in6addr_any;