Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139116
b: refs/heads/master
c: 424b86a
h: refs/heads/master
v: v3
  • Loading branch information
Pablo Neira Ayuso authored and David S. Miller committed Mar 29, 2009
1 parent 9ef39bf commit 51daee2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 13223cb02ccfa375f2d683d08d30db5b72264f1e
refs/heads/master: 424b86a6bc9459a830e1e94e0e908f3ac1716b7e
11 changes: 9 additions & 2 deletions trunk/net/netfilter/xt_cluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ xt_cluster_hash(const struct nf_conn *ct,
return (((u64)hash * info->total_nodes) >> 32);
}

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
xt_cluster_is_multicast_addr(const struct sk_buff *skb, u_int8_t family)
{
Expand All @@ -67,8 +74,8 @@ xt_cluster_is_multicast_addr(const struct sk_buff *skb, u_int8_t family)
is_multicast = ipv4_is_multicast(ip_hdr(skb)->daddr);
break;
case NFPROTO_IPV6:
is_multicast = ipv6_addr_type(&ipv6_hdr(skb)->daddr) &
IPV6_ADDR_MULTICAST;
is_multicast =
xt_cluster_ipv6_is_multicast(&ipv6_hdr(skb)->daddr);
break;
default:
WARN_ON(1);
Expand Down

0 comments on commit 51daee2

Please sign in to comment.