diff options
-rw-r--r-- | net/netfilter/nf_conntrack_core.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 9858bcb29aa0..2b0cc7a1771c 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c | |||
@@ -128,10 +128,11 @@ static u_int32_t __hash_conntrack(const struct nf_conntrack_tuple *tuple, | |||
128 | unsigned int size, unsigned int rnd) | 128 | unsigned int size, unsigned int rnd) |
129 | { | 129 | { |
130 | unsigned int a, b; | 130 | unsigned int a, b; |
131 | a = jhash((void *)tuple->src.u3.all, sizeof(tuple->src.u3.all), | 131 | |
132 | ((tuple->src.l3num) << 16) | tuple->dst.protonum); | 132 | a = jhash2(tuple->src.u3.all, ARRAY_SIZE(tuple->src.u3.all), |
133 | b = jhash((void *)tuple->dst.u3.all, sizeof(tuple->dst.u3.all), | 133 | (tuple->src.l3num << 16) | tuple->dst.protonum); |
134 | (tuple->src.u.all << 16) | tuple->dst.u.all); | 134 | b = jhash2(tuple->dst.u3.all, ARRAY_SIZE(tuple->dst.u3.all), |
135 | (tuple->src.u.all << 16) | tuple->dst.u.all); | ||
135 | 136 | ||
136 | return jhash_2words(a, b, rnd) % size; | 137 | return jhash_2words(a, b, rnd) % size; |
137 | } | 138 | } |