diff options
author | Vasily Khoruzhick <vasilykh@arista.com> | 2018-10-25 22:15:43 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-21 11:24:09 +0300 |
commit | 54ab59528026cc6140be55fd918eedbdf2ee9677 (patch) | |
tree | 329697cf2c05e801db28b67ec96a46b49ae35ed9 /arch/arm/mm/proc-v7.S | |
parent | e6e4f052a20670e324d7cebd68460228f00086e5 (diff) | |
download | linux-54ab59528026cc6140be55fd918eedbdf2ee9677.tar.xz |
netfilter: conntrack: fix calculation of next bucket number in early_drop
commit f393808dc64149ccd0e5a8427505ba2974a59854 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: 3e86638e9a0b ("netfilter: conntrack: consider ct netns in early_drop logic")
Cc: <stable@vger.kernel.org> # v4.7+
Signed-off-by: Vasily Khoruzhick <vasilykh@arista.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/arm/mm/proc-v7.S')
0 files changed, 0 insertions, 0 deletions