You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by da...@apache.org on 2018/08/23 19:13:18 UTC

[trafficserver] branch master updated: Corrects IPv4 multicast ip address check

This is an automated email from the ASF dual-hosted git repository.

dagit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new bb0275e  Corrects IPv4 multicast ip address check
bb0275e is described below

commit bb0275ea2ea9c0f86080b4a1596038f898eb39ac
Author: Derek Dagit <de...@oath.com>
AuthorDate: Thu Aug 23 11:36:51 2018 -0500

    Corrects IPv4 multicast ip address check
---
 lib/ts/ink_inet.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/ts/ink_inet.h b/lib/ts/ink_inet.h
index a0e74a6..ea16eaf 100644
--- a/lib/ts/ink_inet.h
+++ b/lib/ts/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.