1 Index: linux-2.6.25.1/net/netfilter/nf_conntrack_core.c
2 ===================================================================
3 --- linux-2.6.25.1.orig/net/netfilter/nf_conntrack_core.c
4 +++ linux-2.6.25.1/net/netfilter/nf_conntrack_core.c
5 @@ -73,19 +73,15 @@ static unsigned int nf_conntrack_hash_rn
6 static u_int32_t __hash_conntrack(const struct nf_conntrack_tuple *tuple,
7 unsigned int size, unsigned int rnd)
13 - /* The direction must be ignored, so we hash everything up to the
14 - * destination ports (which is a multiple of 4) and treat the last
15 - * three bytes manually.
17 - n = (sizeof(tuple->src) + sizeof(tuple->dst.u3)) / sizeof(u32);
18 - h = jhash2((u32 *)tuple, n,
19 - rnd ^ (((__force __u16)tuple->dst.u.all << 16) |
20 - tuple->dst.protonum));
21 + a = jhash2(tuple->src.u3.all, ARRAY_SIZE(tuple->src.u3.all),
22 + (tuple->src.l3num << 16) | tuple->dst.protonum);
23 + b = jhash2(tuple->dst.u3.all, ARRAY_SIZE(tuple->dst.u3.all),
24 + ((__force __u16)tuple->src.u.all << 16) |
25 + (__force __u16)tuple->dst.u.all);
27 - return ((u64)h * size) >> 32;
28 + return ((u64)jhash_2words(a, b, rnd) * size) >> 32;
31 static inline u_int32_t hash_conntrack(const struct nf_conntrack_tuple *tuple)