diff options
author | Vasily Khoruzhick <vasilykh@arista.com> | 2018-10-25 12:15:43 -0700 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-11-03 14:16:28 +0100 |
commit | f393808dc64149ccd0e5a8427505ba2974a59854 (patch) | |
tree | 023e5b21bd9552c5f15764d0f8ed50e7a5c574ce /include/net | |
parent | e4844c9c62a0fe47980d6c3d4b7a096a5d755925 (diff) | |
download | blackbird-obmc-linux-f393808dc64149ccd0e5a8427505ba2974a59854.tar.gz blackbird-obmc-linux-f393808dc64149ccd0e5a8427505ba2974a59854.zip |
netfilter: conntrack: fix calculation of next bucket number in early_drop
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>
Diffstat (limited to 'include/net')
0 files changed, 0 insertions, 0 deletions