Re: Introduction - pre patch submission

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Mon, 03 May 2010 21:59:27 +1200

Robert Marcano wrote:
> On 04/30/2010 10:42 PM, Amos Jeffries wrote:
>> Robert Marcano wrote:
>>>
>>> - Make tcp_outgoing_address be able to use an interface name and not
>>> only a fixed ip address, this solve a problem we have with some setups
>>> where we allow to acces to the internet with a dedicated ISP for a
>>> group of users, and that ISP is using a dynamic ip (we currently solve
>>> this with a scripting hack regenerating the configuration file)
>>>
>>
>> tcp_outgoing_address is absolutely not the right place for this. A
>> separate tcp_outgoing_interface will be needed at minimum.
>>
>> I'm interested in hearing how you propose to make this work.
>>
>> You will face the problems of:
>> * how to identify the kernel ID of the interface name configured.
>> * how to pass the interface ID back using the socket API.
>>
>
> This is done normally on POSIX applications iterating over the returned
> list from getifaddrs

So an automatically generated outgoing IP address based on an iface name
then?
  Selecting the iface, then picking from one of its addresses?

Sounds like it should actually work.

>
> On Windows, the same idea but using GetAdaptersAddresses looking for the
> AdapterName
>
> tcp_outgoing_interface will need a parameter in order to indicate which
> address to use ipv4, ipv6 or both

No. The v4/v6 family needs to be determined from destination address
when running over the list.

Unfortunately the current forwarding API does not reveal the destination
IP to the selection process.

I'm planning a restructure of the comm interface used by forwarding in a
way that makes the selection choose both destination and source pair
correctly.

  If you are able to assist with that restructure it would be very
welcome. It will allow selections like this to generate and filter sets
of forwarding options down to a plan of action which is then tried.

The code changes are:
  - a little bit of sourcelayout shuffling (very minor)
  - creation of a new comm API (very simple compared to the existing)
  - alteration of fwdStart into two functions fwdPathSelect() and fwdStart()

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE9 or 3.1.3
Received on Mon May 03 2010 - 09:59:36 MDT

This archive was generated by hypermail 2.2.0 : Tue May 04 2010 - 12:00:06 MDT