Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154102
b: refs/heads/master
c: f9ffc31
h: refs/heads/master
v: v3
  • Loading branch information
Patrick McHardy committed Jun 22, 2009
1 parent d7c6c88 commit 8737ef1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 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: 8d8890b7751387f58ce0a6428773de2fbc0fd596
refs/heads/master: f9ffc31251c2caa11962c9b74ce650e2167fa8d1
8 changes: 4 additions & 4 deletions trunk/net/netfilter/xt_NFQUEUE.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ nfqueue_tg(struct sk_buff *skb, const struct xt_target_param *par)
static u32 hash_v4(const struct sk_buff *skb)
{
const struct iphdr *iph = ip_hdr(skb);
u32 ipaddr;
__be32 ipaddr;

/* packets in either direction go into same queue */
ipaddr = iph->saddr ^ iph->daddr;

return jhash_2words(ipaddr, iph->protocol, jhash_initval);
return jhash_2words((__force u32)ipaddr, iph->protocol, jhash_initval);
}

static unsigned int
Expand All @@ -63,14 +63,14 @@ nfqueue_tg4_v1(struct sk_buff *skb, const struct xt_target_param *par)
static u32 hash_v6(const struct sk_buff *skb)
{
const struct ipv6hdr *ip6h = ipv6_hdr(skb);
u32 addr[4];
__be32 addr[4];

addr[0] = ip6h->saddr.s6_addr32[0] ^ ip6h->daddr.s6_addr32[0];
addr[1] = ip6h->saddr.s6_addr32[1] ^ ip6h->daddr.s6_addr32[1];
addr[2] = ip6h->saddr.s6_addr32[2] ^ ip6h->daddr.s6_addr32[2];
addr[3] = ip6h->saddr.s6_addr32[3] ^ ip6h->daddr.s6_addr32[3];

return jhash2(addr, ARRAY_SIZE(addr), jhash_initval);
return jhash2((__force u32 *)addr, ARRAY_SIZE(addr), jhash_initval);
}

static unsigned int
Expand Down
8 changes: 4 additions & 4 deletions trunk/net/netfilter/xt_cluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
#include <net/netfilter/nf_conntrack.h>
#include <linux/netfilter/xt_cluster.h>

static inline u_int32_t nf_ct_orig_ipv4_src(const struct nf_conn *ct)
static inline u32 nf_ct_orig_ipv4_src(const struct nf_conn *ct)
{
return ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u3.ip;
return (__force u32)ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u3.ip;
}

static inline const void *nf_ct_orig_ipv6_src(const struct nf_conn *ct)
static inline const u32 *nf_ct_orig_ipv6_src(const struct nf_conn *ct)
{
return ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u3.ip6;
return (__force u32 *)ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u3.ip6;
}

static inline u_int32_t
Expand Down

0 comments on commit 8737ef1

Please sign in to comment.