summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-05-22 09:02:16 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:08:21 -0500
commitfd51a5c5bd4c22cb43ff30b3250f5ae9ce5ae3c7 (patch)
tree306afd49e88242d5443e9582d78bef42934a57fe /source4/lib
parent225d6485eb896bfa50b564aabfe20967edd008e4 (diff)
downloadsamba-fd51a5c5bd4c22cb43ff30b3250f5ae9ce5ae3c7.tar.gz
samba-fd51a5c5bd4c22cb43ff30b3250f5ae9ce5ae3c7.tar.bz2
samba-fd51a5c5bd4c22cb43ff30b3250f5ae9ce5ae3c7.zip
r15798: shortcut the lookup of "localhost" in the ipv6 backend
(This used to be commit dea82fa615e33115e42ef04c8d2a54788aa38e9a)
Diffstat (limited to 'source4/lib')
-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;