Re: [squid-users] Re: squid qos_flows - copying mark from client side to upstream request?

From: Amos Jeffries <>
Date: Wed, 03 Apr 2013 19:47:16 +1300

On 3/04/2013 9:45 a.m., Ed W wrote:
> On 02/04/2013 21:14, Andrew Beverley wrote:
>>> (I will always have another proxy as my upstream). If so then actually
>>> I need to reset the mark for each request?
>> I *think* you could just set the mark on the upstream connection for
>> each request.
> I think this is the correct answer (so that it handles persistent
> connections).

If I was understanding your requirements you involved switching upstream
link depending on the MARK.
Switching the link used by packets of a TCP connection mid-stream will
encounter problems. Squid only selects persistent connection to re-use
via a src:dest IPs and domain name combo. So you will need to set the
tcp_outgoing_addr per-MARK to ensure TCP connections contain only
requests to the same uplink.

> I confess to not yet having continued to explore the code, but I guess
> I need recommendations on a good place to insert this - basically I
> need the point where a new request hits the network in the direction
> of the upstream
> A leg up would be welcome, I will continue to explore the code in the
> meantime.

Upstream HTTP traffic is handled in src/ the outbound request
hits the upstream link in the Comm::Write at the end of

NP: this is long after the connection selection, which will just need a
new ACL for testing the client MARK or something equivalent.
Opening of new connections and setup of all flags which need to be done
before TCP SYN is done in src/comm/ConnOpener.*.

Received on Thu Apr 04 2013 - 01:03:01 MDT

This archive was generated by hypermail 2.2.0 : Thu Apr 04 2013 - 12:00:04 MDT