diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2007-07-26 12:33:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-26 14:11:56 -0400 |
commit | a34c45896a723ee7b13128ac8bf564ea42fcd1eb (patch) | |
tree | 0b898fb2e780cb0a11a44c347745f2cb2f4a78af /net/ipv4 | |
parent | e0e5de00b0ee5a3b652d829f2c1e89265e9c6a99 (diff) |
netfilter endian regressions
no real bugs, just misannotations cropping up
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/netfilter/nf_nat_core.c | 3 | ||||
-rw-r--r-- | net/ipv4/netfilter/nf_nat_rule.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/netfilter/nf_nat_core.c b/net/ipv4/netfilter/nf_nat_core.c index e848d8d6292..deab27facba 100644 --- a/net/ipv4/netfilter/nf_nat_core.c +++ b/net/ipv4/netfilter/nf_nat_core.c | |||
@@ -77,7 +77,8 @@ static inline unsigned int | |||
77 | hash_by_src(const struct nf_conntrack_tuple *tuple) | 77 | hash_by_src(const struct nf_conntrack_tuple *tuple) |
78 | { | 78 | { |
79 | /* Original src, to ensure we map it consistently if poss. */ | 79 | /* Original src, to ensure we map it consistently if poss. */ |
80 | return jhash_3words((__force u32)tuple->src.u3.ip, tuple->src.u.all, | 80 | return jhash_3words((__force u32)tuple->src.u3.ip, |
81 | (__force u32)tuple->src.u.all, | ||
81 | tuple->dst.protonum, 0) % nf_nat_htable_size; | 82 | tuple->dst.protonum, 0) % nf_nat_htable_size; |
82 | } | 83 | } |
83 | 84 | ||
diff --git a/net/ipv4/netfilter/nf_nat_rule.c b/net/ipv4/netfilter/nf_nat_rule.c index 0f45427e5fd..76ec59ae524 100644 --- a/net/ipv4/netfilter/nf_nat_rule.c +++ b/net/ipv4/netfilter/nf_nat_rule.c | |||
@@ -192,7 +192,7 @@ alloc_null_binding_confirmed(struct nf_conn *ct, unsigned int hooknum) | |||
192 | = (HOOK2MANIP(hooknum) == IP_NAT_MANIP_SRC | 192 | = (HOOK2MANIP(hooknum) == IP_NAT_MANIP_SRC |
193 | ? ct->tuplehash[IP_CT_DIR_REPLY].tuple.dst.u3.ip | 193 | ? ct->tuplehash[IP_CT_DIR_REPLY].tuple.dst.u3.ip |
194 | : ct->tuplehash[IP_CT_DIR_REPLY].tuple.src.u3.ip); | 194 | : ct->tuplehash[IP_CT_DIR_REPLY].tuple.src.u3.ip); |
195 | u_int16_t all | 195 | __be16 all |
196 | = (HOOK2MANIP(hooknum) == IP_NAT_MANIP_SRC | 196 | = (HOOK2MANIP(hooknum) == IP_NAT_MANIP_SRC |
197 | ? ct->tuplehash[IP_CT_DIR_REPLY].tuple.dst.u.all | 197 | ? ct->tuplehash[IP_CT_DIR_REPLY].tuple.dst.u.all |
198 | : ct->tuplehash[IP_CT_DIR_REPLY].tuple.src.u.all); | 198 | : ct->tuplehash[IP_CT_DIR_REPLY].tuple.src.u.all); |