]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 3504: Regression: clientside_tos fails to mark traffic
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 23 Mar 2012 03:37:46 +0000 (21:37 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 23 Mar 2012 03:37:46 +0000 (21:37 -0600)
revison squid-3.1-10302 removing clientside_tos was a mistake.
The actual problem was portage of ssl_bump access control wrongly
dropping the clientside_tos_done flag.

clientside_mark is the 3.2-only directive.

src/ClientRequestContext.h
src/client_side_request.cc

index 86e65aa02b2e053ca19035f93e71f6fee795141a..99ce613cafebd25dc830e66fee3d2d75d8d80712 100644 (file)
@@ -60,6 +60,7 @@ public:
     bool redirect_done;
     bool no_cache_done;
     bool interpreted_req_hdrs;
+    bool clientside_tos_done;
 #if USE_SSL
     bool sslBumpCheckDone;
 #endif
index 531e43785904a30bedfad54f84fcf08a36d01f7e..eb5aeda7809480279894a61a1cfbaf87c176f65f 100644 (file)
@@ -1370,6 +1370,18 @@ ClientHttpRequest::doCallouts()
         }
     }
 
+    if (!calloutContext->clientside_tos_done) {
+        calloutContext->clientside_tos_done = true;
+        if (getConn() != NULL) {
+            ACLFilledChecklist ch(NULL, request, NULL);
+            ch.src_addr = request->client_addr;
+            ch.my_addr = request->my_addr;
+            int tos = aclMapTOS(Config.accessList.clientside_tos, &ch);
+            if (tos)
+                comm_set_tos(getConn()->fd, tos);
+        }
+    }
+
 #if USE_SSL
     if (!calloutContext->sslBumpCheckDone) {
         calloutContext->sslBumpCheckDone = true;