Index: client_side_request.cc =================================================================== RCS file: /cvsroot/squid/squid3/src/client_side_request.cc,v retrieving revision 1.83 diff -u -r1.83 client_side_request.cc --- client_side_request.cc 14 Dec 2007 23:51:00 -0000 1.83 +++ client_side_request.cc 15 Dec 2007 10:51:20 -0000 @@ -1234,10 +1234,12 @@ // The original author of the code also wanted to pass an errno to // setReplyToError, but it seems unlikely that the errno reflects the // true cause of the error at this point, so I did not pass it. + IPAddress noAddr; + noAddr.SetNoAddr(); ConnStateData::Pointer c = getConn(); repContext->setReplyToError(ERR_ICAP_FAILURE, HTTP_INTERNAL_SERVER_ERROR, request->method, NULL, - (c != NULL ? &c->peer.sin_addr : &no_addr), request, NULL, + (c != NULL ? c->peer : noAddr), request, NULL, (c != NULL && c->auth_user_request ? c->auth_user_request : request->auth_user_request)); Index: ICAP/ICAPModXact.cc =================================================================== RCS file: /cvsroot/squid/squid3/src/ICAP/ICAPModXact.cc,v retrieving revision 1.32 diff -u -r1.32 ICAPModXact.cc --- ICAP/ICAPModXact.cc 14 Dec 2007 23:51:06 -0000 1.32 +++ ICAP/ICAPModXact.cc 15 Dec 2007 10:51:25 -0000 @@ -900,10 +900,7 @@ void ICAPModXact::inheritVirginProperties(HttpRequest &newR, const HttpRequest &oldR) { newR.client_addr = oldR.client_addr; - newR.client_port = oldR.client_port; - newR.my_addr = oldR.my_addr; - newR.my_port = oldR.my_port; // This may be too conservative for the 204 No Content case // may eventually need cloneNullAdaptationImmune() for that. Index: ICAP/ICAPXaction.cc =================================================================== RCS file: /cvsroot/squid/squid3/src/ICAP/ICAPXaction.cc,v retrieving revision 1.22 diff -u -r1.22 ICAPXaction.cc --- ICAP/ICAPXaction.cc 1 Aug 2007 21:51:03 -0000 1.22 +++ ICAP/ICAPXaction.cc 15 Dec 2007 10:51:25 -0000 @@ -107,8 +107,10 @@ if (!TheICAPConfig.reuse_connections) disableRetries(); // this will also safely drain pconn pool + IPAddress client_addr; + client_addr.SetAnyAddr(); // TODO: check whether NULL domain is appropriate here - connection = icapPconnPool->pop(s.host.buf(), s.port, NULL, NULL, isRetriable); + connection = icapPconnPool->pop(s.host.buf(), s.port, NULL, client_addr, isRetriable); if (connection >= 0) { debugs(93,3, HERE << "reused pconn FD " << connection); connector = &ICAPXaction_noteCommConnected; // make doneAll() false @@ -123,7 +125,8 @@ disableRetries(); // we only retry pconn failures - connection = comm_open(SOCK_STREAM, 0, getOutgoingAddr(NULL), 0, + IPAddress outgoing(getOutgoingAddr(NULL)); + connection = comm_open(SOCK_STREAM, 0, outgoing, COMM_NONBLOCKING, s.uri.buf()); if (connection < 0) @@ -171,9 +174,11 @@ } if (reuseConnection) { + IPAddress client_addr; + client_addr.SetAnyAddr(); debugs(93,3, HERE << "pushing pconn" << status()); commSetTimeout(connection, -1, NULL, NULL); - icapPconnPool->push(connection, theService->host.buf(), theService->port, NULL, NULL); + icapPconnPool->push(connection, theService->host.buf(), theService->port, NULL, client_addr); disableRetries(); } else { debugs(93,3, HERE << "closing pconn" << status());