Commit 580c7d9e authored by Taehee Yoo's avatar Taehee Yoo Committed by Pablo Neira Ayuso

netfilter: xt_cluster: get rid of xt_cluster_ipv6_is_multicast

If use the ipv6_addr_is_multicast instead of xt_cluster_ipv6_is_multicast,
then we can reduce code size.
Signed-off-by: default avatarTaehee Yoo <ap420073@gmail.com>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent cceae76e
...@@ -59,13 +59,6 @@ xt_cluster_hash(const struct nf_conn *ct, ...@@ -59,13 +59,6 @@ xt_cluster_hash(const struct nf_conn *ct,
return reciprocal_scale(hash, info->total_nodes); return reciprocal_scale(hash, info->total_nodes);
} }
static inline bool
xt_cluster_ipv6_is_multicast(const struct in6_addr *addr)
{
__be32 st = addr->s6_addr32[0];
return ((st & htonl(0xFF000000)) == htonl(0xFF000000));
}
static inline bool static inline bool
xt_cluster_is_multicast_addr(const struct sk_buff *skb, u_int8_t family) xt_cluster_is_multicast_addr(const struct sk_buff *skb, u_int8_t family)
{ {
...@@ -76,8 +69,7 @@ xt_cluster_is_multicast_addr(const struct sk_buff *skb, u_int8_t family) ...@@ -76,8 +69,7 @@ xt_cluster_is_multicast_addr(const struct sk_buff *skb, u_int8_t family)
is_multicast = ipv4_is_multicast(ip_hdr(skb)->daddr); is_multicast = ipv4_is_multicast(ip_hdr(skb)->daddr);
break; break;
case NFPROTO_IPV6: case NFPROTO_IPV6:
is_multicast = is_multicast = ipv6_addr_is_multicast(&ipv6_hdr(skb)->daddr);
xt_cluster_ipv6_is_multicast(&ipv6_hdr(skb)->daddr);
break; break;
default: default:
WARN_ON(1); WARN_ON(1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment