From patchwork Thu Mar 21 00:06:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pablo Neira Ayuso X-Patchwork-Id: 13598286 X-Patchwork-Delegate: kuba@kernel.org Received: from mail.netfilter.org (mail.netfilter.org [217.70.188.207]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E0E9E191; Thu, 21 Mar 2024 00:06:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.188.207 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710979608; cv=none; b=gq5wJxsBR0fLGKWshkM90lQ1NFxaSOHj+ZjIKtDEjj+uXesphHL/ex54WbWoqHbSQoxZxv+Ksd975fE14E2iREZ7n378ZGRuviMsmC846/4vZ2c/9SI7PSqGhmIBrKZgXixAI6h34p5B9uf80E5DAZX6y4PHFnasUylyizDYDtg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710979608; c=relaxed/simple; bh=cTcmO4w/kTveverO/D/2h609HziKzF1FbmTRMfKDrrc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=YGQ+pCcNB3umsZOdRnPZYDTmqPYx6O4B64YY8ZpXVWHcFF4xcpXxICyPqe8VtSiC9GCCBdUzCZBnyG+fWlMq2etaRmYcflCS13o0ghvzg3poW7etFlfDAK5SkJp+sT/svVbsSm4v6ikUZEqFclLoi6O+7OUrYc1ElysANsinpqM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=netfilter.org; spf=pass smtp.mailfrom=netfilter.org; arc=none smtp.client-ip=217.70.188.207 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=netfilter.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=netfilter.org From: Pablo Neira Ayuso 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 Message-Id: <20240321000635.31865-3-pablo@netfilter.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240321000635.31865-1-pablo@netfilter.org> References: <20240321000635.31865-1-pablo@netfilter.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.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 --- 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) &&