Don't lookup address "0.0.0.0" when we're a remote-shell daemon.

Gets rid of a DNS delay waiting for a lookup failure.
This commit is contained in:
Wayne Davison
2008-10-11 11:00:51 -07:00
parent 08b7c3ed83
commit ea0f037930

View File

@@ -108,6 +108,9 @@ char *client_name(int fd)
struct addrinfo hint, *answer;
int err;
if (strcmp(addr, "0.0.0.0") == 0)
return name_buf;
memset(&hint, 0, sizeof hint);
#ifdef AI_NUMERICHOST