--------------------- PatchSet 5109 Date: 2007/07/30 01:28:25 Author: amosjeffries Branch: squid3-ipv6 Tag: (none) Log: Convert some more ICAP code to IPv6-compatible Members: src/ICAP/ICAPModXact.cc:1.18.2.10->1.18.2.11 Index: squid3/src/ICAP/ICAPModXact.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ICAP/ICAPModXact.cc,v retrieving revision 1.18.2.10 retrieving revision 1.18.2.11 diff -u -r1.18.2.10 -r1.18.2.11 --- squid3/src/ICAP/ICAPModXact.cc 22 Jun 2007 05:26:53 -0000 1.18.2.10 +++ squid3/src/ICAP/ICAPModXact.cc 30 Jul 2007 01:28:25 -0000 1.18.2.11 @@ -1068,6 +1068,7 @@ void ICAPModXact::makeRequestHeaders(MemBuf &buf) { + char ntoabuf[MAX_IPSTRLEN]; /* * XXX These should use HttpHdr interfaces instead of Printfs */ @@ -1134,9 +1135,8 @@ } if (TheICAPConfig.send_client_ip && request) - if (request->client_addr.s_addr != any_addr.s_addr && - request->client_addr.s_addr != no_addr.s_addr) - buf.Printf("X-Client-IP: %s\r\n", inet_ntoa(request->client_addr)); + if (!request->client_addr.IsAnyAddr() && !request->client_addr.IsNoAddr()) + buf.Printf("X-Client-IP: %s\r\n", request->client_addr.NtoA(ntoabuf,MAX_IPSTRLEN)); if (TheICAPConfig.send_client_username && request) makeUsernameHeader(request, buf);