Commit 7f4dae2d authored by Florian Westphal's avatar Florian Westphal Committed by Pablo Neira Ayuso

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=1199Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent b1fc1372
...@@ -494,7 +494,7 @@ static void *nft_hash_deactivate(const struct net *net, ...@@ -494,7 +494,7 @@ static void *nft_hash_deactivate(const struct net *net,
hash = reciprocal_scale(hash, priv->buckets); hash = reciprocal_scale(hash, priv->buckets);
hlist_for_each_entry(he, &priv->table[hash], node) { hlist_for_each_entry(he, &priv->table[hash], node) {
if (!memcmp(nft_set_ext_key(&this->ext), &elem->key.val, if (!memcmp(nft_set_ext_key(&this->ext), &elem->key.val,
set->klen) || set->klen) &&
nft_set_elem_active(&he->ext, genmask)) { nft_set_elem_active(&he->ext, genmask)) {
nft_set_elem_change_active(net, set, &he->ext); nft_set_elem_change_active(net, set, &he->ext);
return he; return he;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment