From: mike Date: Wed, 17 Sep 2008 00:21:59 +0000 (+0000) Subject: Don't lookup connection address if HostNameLookups is disabled. Instead, get X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=36f0a8c48fb7234afe08b6c1a1c6a07eea8ff0c1;p=thirdparty%2Fcups.git Don't lookup connection address if HostNameLookups is disabled. Instead, get 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 --- diff --git a/CHANGES-1.3.txt b/CHANGES-1.3.txt index 4f89c0ed04..48d54885e7 100644 --- a/CHANGES-1.3.txt +++ b/CHANGES-1.3.txt @@ -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 diff --git a/scheduler/client.c b/scheduler/client.c index 10e18ffd07..f328c8034a 100644 --- a/scheduler/client.c +++ b/scheduler/client.c @@ -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