Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netfilter: nft_hash: fix nft_hash_deactivate

Jindřich Makovička says:
The logical OR looks fishy to me. Shouldn't be && there instead?

Link: https://bugzilla.netfilter.org/show_bug.cgi?id=1199
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

authored by

Florian Westphal and committed by
Pablo Neira Ayuso
7f4dae2d b1fc1372

+1 -1
+1 -1
net/netfilter/nft_set_hash.c
··· 494 494 hash = reciprocal_scale(hash, priv->buckets); 495 495 hlist_for_each_entry(he, &priv->table[hash], node) { 496 496 if (!memcmp(nft_set_ext_key(&this->ext), &elem->key.val, 497 - set->klen) || 497 + set->klen) && 498 498 nft_set_elem_active(&he->ext, genmask)) { 499 499 nft_set_elem_change_active(net, set, &he->ext); 500 500 return he;