]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Ip::Address::IsAnyAddr did not return true for IPv4-only anyaddr
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Thu, 30 Jun 2011 03:23:57 +0000 (21:23 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 30 Jun 2011 03:23:57 +0000 (21:23 -0600)
src/ip/IpAddress.cc

index f13da467ad4e292aec7bbbf3de549c62910f5703..eafd899c4e9fc03c19f87428d3787991c7f4c136 100644 (file)
@@ -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.