version 1.1.1.1, 2012/05/29 12:08:38
|
version 1.1.1.1.2.1, 2013/07/22 00:46:30
|
Line 1669 is_wildcard_addr(
|
Line 1669 is_wildcard_addr(
|
const sockaddr_u *psau |
const sockaddr_u *psau |
) |
) |
{ |
{ |
|
unsigned char zerobuf[8]; |
|
|
if (IS_IPV4(psau) && !NSRCADR(psau)) |
if (IS_IPV4(psau) && !NSRCADR(psau)) |
return 1; |
return 1; |
|
|
#ifdef INCLUDE_IPV6_SUPPORT |
#ifdef INCLUDE_IPV6_SUPPORT |
if (IS_IPV6(psau) && S_ADDR6_EQ(psau, &in6addr_any)) |
if (IS_IPV6(psau) && S_ADDR6_EQ(psau, &in6addr_any)) |
|
return 1; |
|
bzero(zerobuf, sizeof(zerobuf)); |
|
// If the host portion is all 0, then assume it's a router's anycast address. |
|
if (IS_IPV6(psau) && memcmp((char*)(&((struct sockaddr_in6*)psau)->sin6_addr) + 8, zerobuf, 8) == 0) |
return 1; |
return 1; |
#endif |
#endif |
|
|