netfilter: nft_set_hash: fix lookups with fixed size hash on big endian
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 25 Feb 2019 13:13:41 +0000 (14:13 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:50:29 +0000 (14:50 +0100)
commit9eebb677099e280669262e651d48cffd788ffb84
treec418fed1b05f0df2d51c9ef67deb19767dc2f033
parentb8efa9fd9e251c1f3ac65154e5a1ae70073f16e5
netfilter: nft_set_hash: fix lookups with fixed size hash on big endian

[ Upstream commit 3b02b0adc242a72b5e46019b6a9e4f84823592f6 ]

Call jhash_1word() for the 4-bytes key case from the insertion and
deactivation path, otherwise big endian arch set lookups fail.

Fixes: 446a8268b7f5 ("netfilter: nft_set_hash: add lookup variant for fixed size hashtable")
Reported-by: Florian Westphal <fw@strlen.de>
Tested-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nft_set_hash.c