You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2018/09/12 18:04:15 UTC
[trafficserver] 01/03: Corrects IPv4 multicast ip address check
This is an automated email from the ASF dual-hosted git repository.
bcall pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit a9ae8ad3bc2f3a69dbb94421bf13d16e51587518
Author: Derek Dagit <de...@oath.com>
AuthorDate: Thu Aug 23 11:36:51 2018 -0500
Corrects IPv4 multicast ip address check
(cherry picked from commit bb0275ea2ea9c0f86080b4a1596038f898eb39ac)
---
include/tscore/ink_inet.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/tscore/ink_inet.h b/include/tscore/ink_inet.h
index d5d810d..4cbf14c 100644
--- a/include/tscore/ink_inet.h
+++ b/include/tscore/ink_inet.h
@@ -620,7 +620,7 @@ ats_is_ip_loopback(IpEndpoint const *ip)
inline bool
ats_is_ip_multicast(sockaddr const *ip)
{
- return ip && ((AF_INET == ip->sa_family && 0xe == *ats_ip_addr8_cast(ip)) ||
+ return ip && ((AF_INET == ip->sa_family && 0xe == (ats_ip_addr8_cast(ip)[0] >> 4)) ||
(AF_INET6 == ip->sa_family && IN6_IS_ADDR_MULTICAST(&ats_ip6_addr_cast(ip))));
}
/// Check for multicast.