1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-21 20:23:50 +03:00

r15798: shortcut the lookup of "localhost" in the ipv6 backend

(This used to be commit dea82fa615)
This commit is contained in:
Andrew Tridgell
2006-05-22 09:02:16 +00:00
committed by Gerald (Jerry) Carter
parent 225d6485eb
commit fd51a5c5bd

View File

@@ -29,6 +29,10 @@ static struct in6_addr interpret_addr6(const char *name)
if (name == NULL) return in6addr_any; if (name == NULL) return in6addr_any;
if (strcasecmp(name, "localhost") == 0) {
name = "::1";
}
he = gethostbyname2(name, PF_INET6); he = gethostbyname2(name, PF_INET6);
if (he == NULL) return in6addr_any; if (he == NULL) return in6addr_any;