From 63f79a82c1a7ce1ed76b1ddad0ad23e71838b3cc Mon Sep 17 00:00:00 2001 From: Sebastien Wenske Date: Fri, 8 Feb 2013 23:40:29 -0700 Subject: [PATCH] Bug 3723: tcp_outgoing_tos/mark broken for CONNECT requests --- src/tunnel.cc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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] << "}"); -- 2.47.2