Commit 5f585c1c authored by Liping Zhang's avatar Liping Zhang Committed by Kleber Sacilotto de Souza

netfilter: nf_tables: fix a wrong check to skip the inactive rules

BugLink: https://bugs.launchpad.net/bugs/1878232

commit 8fff1722 upstream.

nft_genmask_cur has already done left-shift operator on the gencursor,
so there's no need to do left-shift operator on it again.

Fixes: ea4bd995 ("netfilter: nf_tables: add transaction helper functions")
Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: default avatarLiping Zhang <liping.zhang@spreadtrum.com>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarIan May <ian.may@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 17a5a17e
......@@ -130,7 +130,7 @@ nft_do_chain(struct nft_pktinfo *pkt, void *priv)
list_for_each_entry_continue_rcu(rule, &chain->rules, list) {
/* This rule is not active, skip. */
if (unlikely(rule->genmask & (1 << gencursor)))
if (unlikely(rule->genmask & gencursor))
continue;
rulenum++;
......
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