Re: Ip::Address::IsAnyAddr

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 29 Jun 2011 23:23:44 +1200

On 29/06/11 21:26, Tsantilas Christos wrote:
>
> Hi all,
> I am having a small problem with Ip::Address::IsAnyAddr method. As it is
> implemented in the case the ipaddress is an IPv4 address and it is
> AnyAddr, the IsAnyAddr method will return false.
>
> I believe we should fix it as follows:
>
> === modified file 'src/ip/Address.cc'
> --- src/ip/Address.cc 2011-05-27 13:52:35 +0000
> +++ src/ip/Address.cc 2011-06-29 09:23:49 +0000
> @@ -185,7 +185,7 @@
> bool
> Ip::Address::IsAnyAddr() const
> {
> - return IN6_IS_ADDR_UNSPECIFIED( &m_SocketAddr.sin6_addr );
> + return IN6_IS_ADDR_UNSPECIFIED( &m_SocketAddr.sin6_addr ) ||
> IN6_ARE_ADDR_EQUAL( &m_SocketAddr.sin6_addr, &v4_anyaddr);
> }
>
> /// NOTE: Does NOT clear the Port stored. Ony the Address and Type.
>

Okay yes. +1.

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE9 or 3.1.12
   Beta testers wanted for 3.2.0.9 and 3.1.12.3
Received on Wed Jun 29 2011 - 11:23:57 MDT

This archive was generated by hypermail 2.2.0 : Wed Jun 29 2011 - 12:00:05 MDT