Re: TPROXY support in Squid 3

From: Amos Jeffries <squid3@dont-contact.us>
Date: Tue, 08 Apr 2008 10:26:36 +1200

Henrik Nordstrom wrote:
> mån 2008-04-07 klockan 23:11 +1200 skrev Amos Jeffries:
>> We have come up with a 'final-beta' patch for squid-3 now.
>> http://treenet.co.nz/projects/squid/patches/tproxy-squid-3_20080407.patch
>> Just waiting on Laszlo final approval.
>
> Some comments...
>
> There should be a general TPROXY define, shared by all, or the common
> os-independent code should always be enabled. I do not want to see #if
> LINUX_TPROXY2 || LINUX_TPROXY4 defines in the general code. Such ifs
> should only be seen in the lowlevel implementation. And from a code
> maintenance perspective it's best is the common code is always built,
> just as is done for the transparent interception code. The drawback is
> that it costs one or two cpu cycles more per requests even if the
> feature is not available on the platform but it's much much less likely
> the feature gets broken by other changes.
>
>
>
> + /* AYJ: do we actually need to set this again on every accept? */
> + if(fd_table[fd].flags.transparent == 1) {
> + comm_set_transparent(sock);
> + F->flags.transparent = 1;
> + }
>
> You need to at least set the internal flag. But you most likely do no
> need to make the comm call telling the kernel it's a transparent
> connection (it already knows..)
>
>
> Is this indended?

Yes. It was a mistake on my part during the IPv6 conversion. I somehow
thought the comm_openex flags were equivalent to the sock flags. I know
now they only mean the same things, but the actual values are
squid-specific. And the field was not used anyway.

>
>
> @@ -652,7 +673,6 @@
> addr.GetAddrInfo(AI);
> AI->ai_socktype = sock_type;
> AI->ai_protocol = proto;
> - AI->ai_flags = flags;
>
> debugs(50, 3, "comm_openex: Attempt open socket for: " << addr );
>
>
>
> Regards
> Henrik
>

-- 
Please use Squid 2.6.STABLE19 or 3.0.STABLE4
Received on Mon Apr 07 2008 - 16:26:22 MDT

This archive was generated by hypermail 2.2.0 : Wed Apr 30 2008 - 12:00:07 MDT