]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
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 364169fa6f57d9b87cb80511b875fcc37cc1d4c3..1c40e83b9669cdab0d77e4a173f2515dc2cd29b4 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