From: Christos Tsantilas Date: Thu, 24 Nov 2011 07:06:10 +0000 (-0700) Subject: Fix: HttpRequest flags intercepted, spoof_client_ip never set correctly X-Git-Tag: SQUID_3_2_0_14~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f7ada04aaf8041dcbc7948d8fa374b288805dee;p=thirdparty%2Fsquid.git Fix: HttpRequest flags intercepted, spoof_client_ip never set correctly The request_flags::intercepted,request_flags::spoof_client_ip are 1 bit integers so when you are try to set to an integer bigger than 1 will overflow and the results will not be what you are expecting. --- diff --git a/src/client_side.cc b/src/client_side.cc index 7e07cdab93..2504571bf4 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -2541,8 +2541,8 @@ clientProcessRequest(ConnStateData *conn, HttpParser *hp, ClientSocketContext *c * from the port settings to the request. */ if (http->clientConnection != NULL) { - request->flags.intercepted = (http->clientConnection->flags & COMM_INTERCEPTION); - request->flags.spoof_client_ip = (http->clientConnection->flags & COMM_TRANSPARENT); + request->flags.intercepted = ((http->clientConnection->flags & COMM_INTERCEPTION) != 0); + request->flags.spoof_client_ip = ((http->clientConnection->flags & COMM_TRANSPARENT) != 0 ) ; } if (internalCheck(request->urlpath.termedBuf())) {