From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: davem@davemloft.net, netdev@vger.kernel.org, kuba@kernel.org,
pabeni@redhat.com, edumazet@google.com
Subject: [PATCH net 2/3] netfilter: nf_tables: do not compare internal table flags on updates
Date: Thu, 21 Mar 2024 01:06:34 +0100 [thread overview]
Message-ID: <20240321000635.31865-3-pablo@netfilter.org> (raw)
In-Reply-To: <20240321000635.31865-1-pablo@netfilter.org>
Restore skipping transaction if table update does not modify flags.
Fixes: 179d9ba5559a ("netfilter: nf_tables: fix table flag updates")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
net/netfilter/nf_tables_api.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index e93f905e60b6..984c1c83ee38 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -1213,7 +1213,7 @@ static int nf_tables_updtable(struct nft_ctx *ctx)
if (flags & ~NFT_TABLE_F_MASK)
return -EOPNOTSUPP;
- if (flags == ctx->table->flags)
+ if (flags == (ctx->table->flags & NFT_TABLE_F_MASK))
return 0;
if ((nft_table_has_owner(ctx->table) &&
--
2.30.2
next prev parent reply other threads:[~2024-03-21 0:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-21 0:06 [PATCH net 0/3] Netfilter fixes for net Pablo Neira Ayuso
2024-03-21 0:06 ` [PATCH net 1/3] netfilter: nft_set_pipapo: release elements in clone only from destroy path Pablo Neira Ayuso
2024-03-21 0:06 ` Pablo Neira Ayuso [this message]
2024-03-21 0:06 ` [PATCH net 3/3] netfilter: nf_tables: Fix a memory leak in nf_tables_updchain Pablo Neira Ayuso
2024-03-21 10:52 ` Paolo Abeni
2024-03-21 11:11 ` Pablo Neira Ayuso
-- strict thread matches above, loose matches on Subject: below --
2024-03-21 11:21 [PATCH net 0/3,v2] Netfilter fixes for net Pablo Neira Ayuso
2024-03-21 11:21 ` [PATCH net 2/3] netfilter: nf_tables: do not compare internal table flags on updates Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240321000635.31865-3-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).