From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.netfilter.org (mail.netfilter.org [217.70.188.207]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 62B1984A5F; Thu, 13 Jun 2024 01:02:42 +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=1718240563; cv=none; b=iV+TjbaPhLrjFoBaQfg9Z66EoVJ/Z5w13l/UjHpFO5rKbywJvLrz0gpeUt+SCUgE1Fn8MHDpy8GctA59z7rivGKqGt/OI1afnvfr6/EYEFSVbrmhMjdJcTEraPw3xtbSVooNVKS0K3bmP8tEJ9eJ2xHwUNhgvyhbIeNMCWB4TnQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718240563; c=relaxed/simple; bh=q47zAy360POrRe7MdFoXQ34KOw7Qj07FA7CDKCrbjyI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ePZ8pkbZgltwqO8j798T+Filbd9xLzUS7iTcKWP0QlrdqD31jQIoUYROdMl2yohxaTIpOiXn79dM7q7bdzo4LhqRbwCyFfZSOkNdmgan+ygQGGlfGF/C8NKYIKFGIqMdnkSjs8h/knqNFUKAwxt+ukon6aEzSREUDN+L7ywamw0= 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: gregkh@linuxfoundation.org, sashal@kernel.org, stable@vger.kernel.org Subject: [PATCH -stable,4.19.x 37/40] netfilter: nf_tables: do not compare internal table flags on updates Date: Thu, 13 Jun 2024 03:02:06 +0200 Message-Id: <20240613010209.104423-38-pablo@netfilter.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240613010209.104423-1-pablo@netfilter.org> References: <20240613010209.104423-1-pablo@netfilter.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit [ 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 Signed-off-by: Sasha Levin --- 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 d2f095e8853f..2c7fd0df9389 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -890,7 +890,7 @@ static int nf_tables_updtable(struct nft_ctx *ctx) if (flags & ~NFT_TABLE_F_DORMANT) return -EINVAL; - if (flags == ctx->table->flags) + if (flags == (ctx->table->flags & NFT_TABLE_F_MASK)) return 0; /* No dormant off/on/off/on games in single transaction */ -- 2.30.2