]> git.itanic.dy.fi Git - linux-stable/commitdiff
netfilter: nf_tables: do not compare internal table flags on updates
authorPablo Neira Ayuso <pablo@netfilter.org>
Thu, 14 Mar 2024 17:51:38 +0000 (18:51 +0100)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:17:37 +0000 (18:17 -0400)
[ Upstream commit 4a0e7f2decbf9bd72461226f1f5f7dcc4b08f139 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nf_tables_api.c

index 1683dc196b5921da91c8dd81b99ac9106c7493fe..0fe2abf27d12f6c80c9acc50faee79a7e924fa8e 100644 (file)
@@ -1211,7 +1211,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) &&