From fd51a5c5bd4c22cb43ff30b3250f5ae9ce5ae3c7 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 22 May 2006 09:02:16 +0000 Subject: r15798: shortcut the lookup of "localhost" in the ipv6 backend (This used to be commit dea82fa615e33115e42ef04c8d2a54788aa38e9a) --- source4/lib/socket/socket_ipv6.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- cgit