Don't lookup address "0.0.0.0" when we're a remote-shell daemon.
authorWayne Davison <wayned@samba.org>
Sat, 11 Oct 2008 18:00:51 +0000 (11:00 -0700)
committerWayne Davison <wayned@samba.org>
Sat, 11 Oct 2008 18:00:51 +0000 (11:00 -0700)
Gets rid of a DNS delay waiting for a lookup failure.

clientname.c

index 364169f..1c40e83 100644 (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