From: Sebastien Wenske Date: Sat, 9 Feb 2013 06:40:29 +0000 (-0700) Subject: Bug 3723: tcp_outgoing_tos/mark broken for CONNECT requests X-Git-Tag: SQUID_3_2_8~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63f79a82c1a7ce1ed76b1ddad0ad23e71838b3cc;p=thirdparty%2Fsquid.git Bug 3723: tcp_outgoing_tos/mark broken for CONNECT requests --- diff --git a/src/tunnel.cc b/src/tunnel.cc index aa82ebee50..f799f177f0 100644 --- a/src/tunnel.cc +++ b/src/tunnel.cc @@ -50,6 +50,7 @@ #include "client_side.h" #include "MemBuf.h" #include "http.h" +#include "ip/QosConfig.h" #include "PeerSelectState.h" #include "StatCounters.h" @@ -558,6 +559,15 @@ tunnelConnectDone(const Comm::ConnectionPointer &conn, comm_err_t status, int xe tunnelState->serverDestinations.shift(); if (status != COMM_TIMEOUT && tunnelState->serverDestinations.size() > 0) { /* Try another IP of this destination host */ + + if (Ip::Qos::TheConfig.isAclTosActive()) { + tunnelState->serverDestinations[0]->tos = GetTosToServer(tunnelState->request); + } + +#if SO_MARK && USE_LIBCAP + tunnelState->serverDestinations[0]->nfmark = GetNfmarkToServer(tunnelState->request); +#endif + debugs(26, 4, HERE << "retry with : " << tunnelState->serverDestinations[0]); AsyncCall::Pointer call = commCbCall(26,3, "tunnelConnectDone", CommConnectCbPtrFun(tunnelConnectDone, tunnelState)); Comm::ConnOpener *cs = new Comm::ConnOpener(tunnelState->serverDestinations[0], call, Config.Timeout.connect); @@ -724,6 +734,14 @@ tunnelPeerSelectComplete(Comm::ConnectionList *peer_paths, ErrorState *err, void } delete err; + if (Ip::Qos::TheConfig.isAclTosActive()) { + tunnelState->serverDestinations[0]->tos = GetTosToServer(tunnelState->request); + } + +#if SO_MARK && USE_LIBCAP + tunnelState->serverDestinations[0]->nfmark = GetNfmarkToServer(tunnelState->request); +#endif + debugs(26, 3, HERE << "paths=" << peer_paths->size() << ", p[0]={" << (*peer_paths)[0] << "}, serverDest[0]={" << tunnelState->serverDestinations[0] << "}");