diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2007-07-26 16:33:19 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-26 18:11:56 (GMT) |
commit | a34c45896a723ee7b13128ac8bf564ea42fcd1eb (patch) | |
tree | 0b898fb2e780cb0a11a44c347745f2cb2f4a78af /net/netfilter/nf_conntrack_expect.c | |
parent | e0e5de00b0ee5a3b652d829f2c1e89265e9c6a99 (diff) | |
download | linux-a34c45896a723ee7b13128ac8bf564ea42fcd1eb.tar.xz |
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/netfilter/nf_conntrack_expect.c')
-rw-r--r-- | net/netfilter/nf_conntrack_expect.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c index 1aa6229..eb6695d 100644 --- a/net/netfilter/nf_conntrack_expect.c +++ b/net/netfilter/nf_conntrack_expect.c @@ -80,7 +80,7 @@ static unsigned int nf_ct_expect_dst_hash(const struct nf_conntrack_tuple *tuple return jhash2(tuple->dst.u3.all, ARRAY_SIZE(tuple->dst.u3.all), (((tuple->dst.protonum ^ tuple->src.l3num) << 16) | - tuple->dst.u.all) ^ nf_ct_expect_hash_rnd) % + (__force __u16)tuple->dst.u.all) ^ nf_ct_expect_hash_rnd) % nf_ct_expect_hsize; } @@ -259,8 +259,8 @@ void nf_ct_expect_init(struct nf_conntrack_expect *exp, int family, } if (src) { - exp->tuple.src.u.all = (__force u16)*src; - exp->mask.src.u.all = 0xFFFF; + exp->tuple.src.u.all = *src; + exp->mask.src.u.all = htons(0xFFFF); } else { exp->tuple.src.u.all = 0; exp->mask.src.u.all = 0; @@ -272,7 +272,7 @@ void nf_ct_expect_init(struct nf_conntrack_expect *exp, int family, memset((void *)&exp->tuple.dst.u3 + len, 0x00, sizeof(exp->tuple.dst.u3) - len); - exp->tuple.dst.u.all = (__force u16)*dst; + exp->tuple.dst.u.all = *dst; } EXPORT_SYMBOL_GPL(nf_ct_expect_init); |