]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Don't lookup connection address if HostNameLookups is disabled. Instead, get
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 17 Sep 2008 00:21:59 +0000 (00:21 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 17 Sep 2008 00:21:59 +0000 (00:21 +0000)
the numerical address to report to the client.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@7950 7a7537e8-13f0-0310-91df-b6672ffda945

CHANGES-1.3.txt
scheduler/client.c

index 4f89c0ed04fcf294ef56631f29b0c34316703323..48d54885e7e1c8c1ca7264abb753f89336a15cea 100644 (file)
@@ -4,6 +4,8 @@ CHANGES-1.3.txt
 CHANGES IN CUPS V1.3.9
 
        - Documentation updates (STR #2904, STR #2944)
+       - The scheduler incorrectly resolved the client connection
+         address when HostNameLookups was set to Off.
        - The IPP backend incorrectly stopped the local queue if
          the remote server reported the "paused" state.
        - The cupsGetDests() function did not catch all types of
index 10e18ffd0727219a730cc035f702eb30cf0f5c53..f328c8034a2d5868118f08b90ab5fc506da4cc7a 100644 (file)
@@ -437,14 +437,22 @@ cupsdAcceptClient(cupsd_listener_t *lis)/* I - Listener socket */
 #ifdef AF_INET6
     if (temp.addr.sa_family == AF_INET6)
     {
-      httpAddrLookup(&temp, con->servername, sizeof(con->servername));
+      if (HostNameLookups)
+        httpAddrLookup(&temp, con->servername, sizeof(con->servername));
+      else
+        httpAddrString(&temp, con->servername, sizeof(con->servername));
+
       con->serverport = ntohs(lis->address.ipv6.sin6_port);
     }
     else
 #endif /* AF_INET6 */
     if (temp.addr.sa_family == AF_INET)
     {
-      httpAddrLookup(&temp, con->servername, sizeof(con->servername));
+      if (HostNameLookups)
+        httpAddrLookup(&temp, con->servername, sizeof(con->servername));
+      else
+        httpAddrString(&temp, con->servername, sizeof(con->servername));
+
       con->serverport = ntohs(lis->address.ipv4.sin_port);
     }
     else