On Tue, Apr 08, 2008, Henrik Nordstrom wrote:
> tis 2008-04-08 klockan 09:57 +1200 skrev Amos Jeffries:
> > But, baby steps people:
> >   - Get it in
> >   - Get it tested.
> >   - Polish into a class.
> > 
> > So far we are at #1
> 
> And I won't approve the change of sprinkling #if LINUX_TPROXY4 over the
> code, even if it's just adding to the existing #if..
> 
> Get the basic polished up as part of #1.. it's simple, makes things much
> cleaner, and #3 gets a much narrover focus.

My attempt for Squid-2, step 1:

http://www.creative.net.au/diffs/20080408-tproxy-fix-1.diff

This just removes LINUX_TPROXY for the global state stuff and the 
linux_needs_tproxy
global variable.

Looking at it, it probably makes more sense to do this:

comm_open(with flags if tproxy)
if (tproxy for this request)
    comm_bind(non-local bind)
if (comm_bind failed)
    disable tproxy for this request
if (not tproxy)
    comm_bind(local bind - from the outgoing addr ACL logic)

How does that sound?



Adrian

-- 
- Xenion - http://www.xenion.com.au/ - VPS Hosting - Commercial Squid Support -
- $25/pm entry-level VPSes w/ capped bandwidth charges available in WA -

Reply via email to