diff options
author | Patrick McHardy <kaber@trash.net> | 2009-06-22 08:15:02 -0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2009-06-22 08:15:02 -0400 |
commit | f9ffc31251c2caa11962c9b74ce650e2167fa8d1 (patch) | |
tree | 3a409f1676ed95473e54610bfaa8a2100a151972 /net | |
parent | 8d8890b7751387f58ce0a6428773de2fbc0fd596 (diff) |
netfilter: fix some sparse endianess warnings
net/netfilter/xt_NFQUEUE.c:46:9: warning: incorrect type in assignment (different base types)
net/netfilter/xt_NFQUEUE.c:46:9: expected unsigned int [unsigned] [usertype] ipaddr
net/netfilter/xt_NFQUEUE.c:46:9: got restricted unsigned int
net/netfilter/xt_NFQUEUE.c:68:10: warning: incorrect type in assignment (different base types)
net/netfilter/xt_NFQUEUE.c:68:10: expected unsigned int [unsigned] <noident>
net/netfilter/xt_NFQUEUE.c:68:10: got restricted unsigned int
net/netfilter/xt_NFQUEUE.c:69:10: warning: incorrect type in assignment (different base types)
net/netfilter/xt_NFQUEUE.c:69:10: expected unsigned int [unsigned] <noident>
net/netfilter/xt_NFQUEUE.c:69:10: got restricted unsigned int
net/netfilter/xt_NFQUEUE.c:70:10: warning: incorrect type in assignment (different base types)
net/netfilter/xt_NFQUEUE.c:70:10: expected unsigned int [unsigned] <noident>
net/netfilter/xt_NFQUEUE.c:70:10: got restricted unsigned int
net/netfilter/xt_NFQUEUE.c:71:10: warning: incorrect type in assignment (different base types)
net/netfilter/xt_NFQUEUE.c:71:10: expected unsigned int [unsigned] <noident>
net/netfilter/xt_NFQUEUE.c:71:10: got restricted unsigned int
net/netfilter/xt_cluster.c:20:55: warning: incorrect type in return expression (different base types)
net/netfilter/xt_cluster.c:20:55: expected unsigned int
net/netfilter/xt_cluster.c:20:55: got restricted unsigned int const [usertype] ip
net/netfilter/xt_cluster.c:20:55: warning: incorrect type in return expression (different base types)
net/netfilter/xt_cluster.c:20:55: expected unsigned int
net/netfilter/xt_cluster.c:20:55: got restricted unsigned int const [usertype] ip
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/xt_NFQUEUE.c | 8 | ||||
-rw-r--r-- | net/netfilter/xt_cluster.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/net/netfilter/xt_NFQUEUE.c b/net/netfilter/xt_NFQUEUE.c index 498b45101df7..f28f6a5fc02d 100644 --- a/net/netfilter/xt_NFQUEUE.c +++ b/net/netfilter/xt_NFQUEUE.c | |||
@@ -40,12 +40,12 @@ nfqueue_tg(struct sk_buff *skb, const struct xt_target_param *par) | |||
40 | static u32 hash_v4(const struct sk_buff *skb) | 40 | static u32 hash_v4(const struct sk_buff *skb) |
41 | { | 41 | { |
42 | const struct iphdr *iph = ip_hdr(skb); | 42 | const struct iphdr *iph = ip_hdr(skb); |
43 | u32 ipaddr; | 43 | __be32 ipaddr; |
44 | 44 | ||
45 | /* packets in either direction go into same queue */ | 45 | /* packets in either direction go into same queue */ |
46 | ipaddr = iph->saddr ^ iph->daddr; | 46 | ipaddr = iph->saddr ^ iph->daddr; |
47 | 47 | ||
48 | return jhash_2words(ipaddr, iph->protocol, jhash_initval); | 48 | return jhash_2words((__force u32)ipaddr, iph->protocol, jhash_initval); |
49 | } | 49 | } |
50 | 50 | ||
51 | static unsigned int | 51 | static unsigned int |
@@ -63,14 +63,14 @@ nfqueue_tg4_v1(struct sk_buff *skb, const struct xt_target_param *par) | |||
63 | static u32 hash_v6(const struct sk_buff *skb) | 63 | static u32 hash_v6(const struct sk_buff *skb) |
64 | { | 64 | { |
65 | const struct ipv6hdr *ip6h = ipv6_hdr(skb); | 65 | const struct ipv6hdr *ip6h = ipv6_hdr(skb); |
66 | u32 addr[4]; | 66 | __be32 addr[4]; |
67 | 67 | ||
68 | addr[0] = ip6h->saddr.s6_addr32[0] ^ ip6h->daddr.s6_addr32[0]; | 68 | addr[0] = ip6h->saddr.s6_addr32[0] ^ ip6h->daddr.s6_addr32[0]; |
69 | addr[1] = ip6h->saddr.s6_addr32[1] ^ ip6h->daddr.s6_addr32[1]; | 69 | addr[1] = ip6h->saddr.s6_addr32[1] ^ ip6h->daddr.s6_addr32[1]; |
70 | addr[2] = ip6h->saddr.s6_addr32[2] ^ ip6h->daddr.s6_addr32[2]; | 70 | addr[2] = ip6h->saddr.s6_addr32[2] ^ ip6h->daddr.s6_addr32[2]; |
71 | addr[3] = ip6h->saddr.s6_addr32[3] ^ ip6h->daddr.s6_addr32[3]; | 71 | addr[3] = ip6h->saddr.s6_addr32[3] ^ ip6h->daddr.s6_addr32[3]; |
72 | 72 | ||
73 | return jhash2(addr, ARRAY_SIZE(addr), jhash_initval); | 73 | return jhash2((__force u32 *)addr, ARRAY_SIZE(addr), jhash_initval); |
74 | } | 74 | } |
75 | 75 | ||
76 | static unsigned int | 76 | static unsigned int |
diff --git a/net/netfilter/xt_cluster.c b/net/netfilter/xt_cluster.c index 69a639f35403..225ee3ecd69d 100644 --- a/net/netfilter/xt_cluster.c +++ b/net/netfilter/xt_cluster.c | |||
@@ -15,14 +15,14 @@ | |||
15 | #include <net/netfilter/nf_conntrack.h> | 15 | #include <net/netfilter/nf_conntrack.h> |
16 | #include <linux/netfilter/xt_cluster.h> | 16 | #include <linux/netfilter/xt_cluster.h> |
17 | 17 | ||
18 | static inline u_int32_t nf_ct_orig_ipv4_src(const struct nf_conn *ct) | 18 | static inline u32 nf_ct_orig_ipv4_src(const struct nf_conn *ct) |
19 | { | 19 | { |
20 | return ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u3.ip; | 20 | return (__force u32)ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u3.ip; |
21 | } | 21 | } |
22 | 22 | ||
23 | static inline const void *nf_ct_orig_ipv6_src(const struct nf_conn *ct) | 23 | static inline const u32 *nf_ct_orig_ipv6_src(const struct nf_conn *ct) |
24 | { | 24 | { |
25 | return ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u3.ip6; | 25 | return (__force u32 *)ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u3.ip6; |
26 | } | 26 | } |
27 | 27 | ||
28 | static inline u_int32_t | 28 | static inline u_int32_t |