]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Preserve bumped client IP
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Fri, 25 May 2012 08:36:31 +0000 (11:36 +0300)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Fri, 25 May 2012 08:36:31 +0000 (11:36 +0300)
The bumped tproxied connections does not use the client IP as the source address
from web server point of view in the case of bump-server-first mode.

src/client_side.cc

index eca721cf0169d0b8266710fc396c8abb0431ca26..6fe7702e5e6916945051f7834244f172154b2630 100644 (file)
@@ -3562,7 +3562,7 @@ httpsEstablish(ConnStateData *connState,  SSL_CTX *sslContext, Ssl::BumpMode bum
         fakeRequest->indirect_client_addr = connState->clientConnection->remote;
 #endif
         fakeRequest->my_addr = connState->clientConnection->local;
-
+        fakeRequest->flags.spoof_client_ip = ((connState->clientConnection->flags & COMM_TRANSPARENT) != 0 ) ;
         debugs(33, 4, HERE << details << " try to generate a Dynamic SSL CTX");
         connState->switchToHttps(fakeRequest, bumpMode);
     }