]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
netfilter: nft_set_hash: fix get operation on big endian
authorFlorian Westphal <fw@strlen.de>
Tue, 27 Jan 2026 19:13:45 +0000 (20:13 +0100)
committerFlorian Westphal <fw@strlen.de>
Fri, 6 Feb 2026 12:34:55 +0000 (13:34 +0100)
commit2f635adbe2642d398a0be3ab245accd2987be0c3
treef55e37a69ec45cc0e197b9a48499a7b7f38785d6
parent1d79ae50e310092182a0a8450292ee1c2f99efcf
netfilter: nft_set_hash: fix get operation on big endian

tests/shell/testcases/packetpath/set_match_nomatch_hash_fast
fails on big endian with:

Error: Could not process rule: No such file or directory
reset element ip test s { 244.147.90.126 }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Fatal: Cannot fetch element "244.147.90.126"

... because the wrong bucket is searched, jhash() and jhash1_word are
not interchangeable on big endian.

Fixes: 3b02b0adc242 ("netfilter: nft_set_hash: fix lookups with fixed size hash on big endian")
Signed-off-by: Florian Westphal <fw@strlen.de>
net/netfilter/nft_set_hash.c