diff options
author | Philip Craig <philipc@snapgear.com> | 2008-04-29 06:35:10 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-29 06:35:10 -0400 |
commit | 443a70d50bdc212e1292778e264ce3d0a85b896f (patch) | |
tree | 6b00ca5759949a4c11f77b683d9f65cae82a68e3 /include | |
parent | 0010e46577a27c1d915034637f6c2fa57a9a091c (diff) |
netfilter: nf_conntrack: padding breaks conntrack hash on ARM
commit 0794935e "[NETFILTER]: nf_conntrack: optimize hash_conntrack()"
results in ARM platforms hashing uninitialised padding. This padding
doesn't exist on other architectures.
Fix this by replacing NF_CT_TUPLE_U_BLANK() with memset() to ensure
everything is initialised. There were only 4 bytes that
NF_CT_TUPLE_U_BLANK() wasn't clearing anyway (or 12 bytes on ARM).
Signed-off-by: Philip Craig <philipc@snapgear.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/netfilter/nf_conntrack_tuple.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/include/net/netfilter/nf_conntrack_tuple.h b/include/net/netfilter/nf_conntrack_tuple.h index 1bb7087833d3..a6874ba22d54 100644 --- a/include/net/netfilter/nf_conntrack_tuple.h +++ b/include/net/netfilter/nf_conntrack_tuple.h | |||
@@ -107,16 +107,6 @@ struct nf_conntrack_tuple_mask | |||
107 | } src; | 107 | } src; |
108 | }; | 108 | }; |
109 | 109 | ||
110 | /* This is optimized opposed to a memset of the whole structure. Everything we | ||
111 | * really care about is the source/destination unions */ | ||
112 | #define NF_CT_TUPLE_U_BLANK(tuple) \ | ||
113 | do { \ | ||
114 | (tuple)->src.u.all = 0; \ | ||
115 | (tuple)->dst.u.all = 0; \ | ||
116 | memset(&(tuple)->src.u3, 0, sizeof((tuple)->src.u3)); \ | ||
117 | memset(&(tuple)->dst.u3, 0, sizeof((tuple)->dst.u3)); \ | ||
118 | } while (0) | ||
119 | |||
120 | #ifdef __KERNEL__ | 110 | #ifdef __KERNEL__ |
121 | 111 | ||
122 | static inline void nf_ct_dump_tuple_ip(const struct nf_conntrack_tuple *t) | 112 | static inline void nf_ct_dump_tuple_ip(const struct nf_conntrack_tuple *t) |