1 - don't bother resolving localhost, as it gives weird results in mixed IPv4/IPV6 environments
2 --- tcp_wrappers_7.6/hosts_access.c.196326 2007-06-28 13:44:10.000000000 +0200
3 +++ tcp_wrappers_7.6/hosts_access.c 2007-06-28 15:33:45.000000000 +0200
5 return (STR_NE(string, unknown));
6 } else if (tok[(n = strlen(tok)) - 1] == '.') { /* prefix */
7 return (STRN_EQ(tok, string, n));
8 + } else if ((STR_EQ(tok, "localhost") || STR_EQ(tok, "localhost.localdomain"))
9 + && (STR_EQ(string, "localhost") || STR_EQ(string, "localhost.localdomain"))) {
10 + return (YES); /* these localhosts are equivalent */
11 } else { /* exact match */
13 struct addrinfo hints, *res;