From: Christos Tsantilas Date: Wed, 23 Nov 2011 17:04:13 +0000 (+0200) Subject: Bug fix: HttpRequest::flags.intercepted, HttpRequest::flags.spoof_client_ip neve X-Git-Tag: BumpSslServerFirst.take05~12^2~172 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=304a61803899cfd55f596f38d18c44fba03534ab;p=thirdparty%2Fsquid.git Bug fix: HttpRequest::flags.intercepted, HttpRequest::flags.spoof_client_ip neve r set 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())) {