Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
netfilter: conntrack: fix calculation of next bucket number in early_…
…drop commit f393808 upstream. If there's no entry to drop in bucket that corresponds to the hash, early_drop() should look for it in other buckets. But since it increments hash instead of bucket number, it actually looks in the same bucket 8 times: hsize is 16k by default (14 bits) and hash is 32-bit value, so reciprocal_scale(hash, hsize) returns the same value for hash..hash+7 in most cases. Fix it by increasing bucket number instead of hash and rename _hash to bucket to avoid future confusion. Fixes: 3e86638 ("netfilter: conntrack: consider ct netns in early_drop logic") Cc: <[email protected]> # v4.7+ Signed-off-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
- Loading branch information