Convert usage of IN_MULTICAST to ipv4_is_multicast
IN_MULTICAST's primary intent is as a uapi macro. Elsewhere in the kernel we use ipv4_is_multicast consistently. This patch unifies linux's multicast checks to use that function rather than this macro. Signed-off-by: Dave Taht <dave.taht@gmail.com> Reviewed-by: Toke Høiland-Jørgensen <toke@toke.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
9367fa0841
commit
842841ece5
@@ -391,7 +391,7 @@ static inline bool vxlan_addr_multicast(const union vxlan_addr *ipa)
|
||||
if (ipa->sa.sa_family == AF_INET6)
|
||||
return ipv6_addr_is_multicast(&ipa->sin6.sin6_addr);
|
||||
else
|
||||
return IN_MULTICAST(ntohl(ipa->sin.sin_addr.s_addr));
|
||||
return ipv4_is_multicast(ipa->sin.sin_addr.s_addr);
|
||||
}
|
||||
|
||||
#else /* !IS_ENABLED(CONFIG_IPV6) */
|
||||
@@ -403,7 +403,7 @@ static inline bool vxlan_addr_any(const union vxlan_addr *ipa)
|
||||
|
||||
static inline bool vxlan_addr_multicast(const union vxlan_addr *ipa)
|
||||
{
|
||||
return IN_MULTICAST(ntohl(ipa->sin.sin_addr.s_addr));
|
||||
return ipv4_is_multicast(ipa->sin.sin_addr.s_addr);
|
||||
}
|
||||
|
||||
#endif /* IS_ENABLED(CONFIG_IPV6) */
|
||||
|
Reference in New Issue
Block a user