On 07/27/2011 01:28 AM, Amos Jeffries wrote:
> On Tue, 26 Jul 2011 18:05:57 +0300, Tsantilas Christos wrote:
>> On 07/26/2011 02:01 AM, Amos Jeffries wrote:
>>> On Mon, 25 Jul 2011 17:59:48 +0300, Tsantilas Christos wrote:
>>>> I am sending a version 4 of the patch which is the same with Amos
>>>> patch but is a little smaller. IT is easier to see the changes.
>>>>
>>>>
>>>> But applying this patch I found some problems in icp* related code.
>>>> This problems has as result an assertion failure inside icp code.
>>>> I am attaching a patch which is required to allow icp works with
>>>> isAnyAddr patch, but maybe fixes bugs.
>>>>
>>>> From what I can understand reading about the icp protocol, it
>>>> supports only the IPv4 protocol: It contains in icp messages header a
>>>> 32bit number which represents the ip address of sender. This is mean
>>>> that only ipv4 addresses can used.
>>>>
>>>> The icp-isanyaddr.patch:
>>>> 1) Use the ip::Address::SetIPv4 method to always convert to IPv4 the
>>>> ip addresses used to set the hostid field of the ICP header message.
>>>>
>>>> 2) Inside neighbors_init() function there is the line:
>>>> theIcpPublicHostID.GetInAddr( *((struct in_addr*)&echo_hdr.shostid) );
>>>> The above line sets the hostid field of the header of the icp echo
>>>> message, to theIcpPublciHostID. The problem is that this ipaddress is
>>>> not initialized yet. Will be initialized inside
>>>> icpIncomingConnectionOpened when this function called.
>>>> The icp-isanyadd.patch replaces the above line with a simple:
>>>> echo_hdr.shostid = 0;
>>>> which is absolutely equivalent (but probably not the correct).
>>>>
>>>> The icp-isanyaddr.patch is not a finished patch but I am posting it
>>>> here to show two (possible) problems:
>>>> - The icp does not work with IPv4 so we may add checks to prevent
>>>> using ipv6 addresses
>>>> - The echo_hdr message initialized with an IP address which is not
>>>> initialized yet.
>>>>
>>>
>>> What you have so far on the ICP looks correct.
>>
>> OK I post a separate patch for icp.
>>
>> Is it OK to commit the isAnyAddr patch to trunk?
>>
>
> Hmm, of itself its ready. But I'm not inclined to +1 it until the ICP
> patch is in.
> I think that is not many minutes work away though.
The ICP patch is in trunk now.
>
> Amos
>
Received on Wed Jul 27 2011 - 13:58:37 MDT
This archive was generated by hypermail 2.2.0 : Thu Jul 28 2011 - 12:00:06 MDT