1 --- linux-2.6.25/net/netfilter/nf_conntrack_core.c 2008-04-17 04:49:44.000000000 +0200
2 +++ linux-2.6.25-owrt/net/netfilter/nf_conntrack_core.c 2008-04-30 12:36:55.000000000 +0200
4 static u_int32_t __hash_conntrack(const struct nf_conntrack_tuple *tuple,
5 unsigned int size, unsigned int rnd)
11 - /* The direction must be ignored, so we hash everything up to the
12 - * destination ports (which is a multiple of 4) and treat the last
13 - * three bytes manually.
15 - n = (sizeof(tuple->src) + sizeof(tuple->dst.u3)) / sizeof(u32);
16 - h = jhash2((u32 *)tuple, n,
17 - rnd ^ (((__force __u16)tuple->dst.u.all << 16) |
18 - tuple->dst.protonum));
19 + a = jhash2(tuple->src.u3.all, ARRAY_SIZE(tuple->src.u3.all),
20 + (tuple->src.l3num << 16) | tuple->dst.protonum);
21 + b = jhash2(tuple->dst.u3.all, ARRAY_SIZE(tuple->dst.u3.all),
22 + ((__force __u16)tuple->src.u.all << 16) |
23 + (__force __u16)tuple->dst.u.all);
25 - return ((u64)h * size) >> 32;
26 + return ((u64)jhash_2words(a, b, rnd) * size) >> 32;
29 static inline u_int32_t hash_conntrack(const struct nf_conntrack_tuple *tuple)