]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Correct TPROXYv4 handling.
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 23 Sep 2008 10:04:23 +0000 (22:04 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 23 Sep 2008 10:04:23 +0000 (22:04 +1200)
Initial design was based on the false assumption that TPROXYv4 worked
like NAT lookups and returned the IPs on IP_TRANSPARENT.
It in fact returns the correct connection IPs on accept(),

This patch makes TPROXYv4 work correctly and spoof client IP. Port needs
to be randomly assigned by the OS to prevent kernel clashes.

Regular traffic is no longer guaranteed when passed in a tproxy marked
port. It may work as expected but no guarantess yet.
Accelerated traffic and NAT intercepted traffic will certainly fail.
As such their flags are marked as mutually exclusive with the tproxy flag.

Multi-Modes will still operate, but only on seperate ports.


Trivial merge