From: Christos Tsantilas Date: Thu, 30 Jun 2011 03:23:57 +0000 (-0600) Subject: Ip::Address::IsAnyAddr did not return true for IPv4-only anyaddr X-Git-Tag: SQUID_3_1_13~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b75e5598ec0dde11698a862e86d9ef8c5407726;p=thirdparty%2Fsquid.git Ip::Address::IsAnyAddr did not return true for IPv4-only anyaddr --- diff --git a/src/ip/IpAddress.cc b/src/ip/IpAddress.cc index f13da467ad..eafd899c4e 100644 --- a/src/ip/IpAddress.cc +++ b/src/ip/IpAddress.cc @@ -199,7 +199,7 @@ bool IpAddress::IsIPv6() const bool IpAddress::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.