Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2405700lqp; Sun, 24 Mar 2024 18:11:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWDeGOeC4ALX1bEspuFS45j1LsLoyCFv/Sbxw9UwUSzm5px7O+0SwPwhJxHk2yl7AT8o0pwQtvaqtYUbVt/E85EphhsYfOcH+mjuAZEsg== X-Google-Smtp-Source: AGHT+IGKl2UFcrXsMIddWcBC2svN2cv3HFY/YHXL8c8z+AHajhDiF6KW0g45XmESPhiO2PUeUA6P X-Received: by 2002:a05:620a:13d4:b0:78a:36ca:34d6 with SMTP id g20-20020a05620a13d400b0078a36ca34d6mr5928300qkl.28.1711329060706; Sun, 24 Mar 2024 18:11:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711329060; cv=pass; d=google.com; s=arc-20160816; b=XXDq0asLeheUD7tzIAwyUsKPyP1K8KQ/qzV6TaXl30XNfJMKd1IGUZ/pO6cpBIe421 3ACPU7pD5l+oiTSVGDyhUCBa2wUpVmTsxyzIs8kPg9uF4KUxzm1+VDNRYr+xouw5bwar 8EQTErw2lYp9gohCYjSFAYSturCwrr3LwWGDD7V6skaUBxjsvVIJipAmWp4G5Kwan/jy 0icbbwD5Tb82Rm3echw6s1MqxY78H+5gXBXwozeV7bDvGpGAFpbWgYNVT4yeGKGphAKI 08ULojqikIYoCMT21aURxx13R0kipwloqM2PCuQqlJ+/Xlcp6537LHIQbPk+44kFb2Lc BZAw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=gF7ZM5bKvb7zvx3+0gog/0pKVvUCYNCEqq2YN6nGLnY=; fh=JCupzcIQwtmyJ2C2xrsc2nqgcJfRphMLLtiVBgyhfvk=; b=KM8GZS8OX+CFwL5ScZwC3vAB4odulnAU61JE1vFKfIQfMIemOE2sxxFeyf4d58V76y +zEGJsvxII9eNPDV6GbgUVIoFehc7eylOjREaZfiSmASc1jEv4RbY4iv1DBPUWicAmuO Mu4TcAhOXNgshLmWYI/ar6bYCH4NZKQyXScxdc0EMm+qq3X4lmY4/UU/Zbl9eLXaB+Nz fP10/ePU63iN++rEpLEAVkNgRTDjdcDp7FHzRQITe4Htcoxs2+6jiqYBrgsovWi3itK8 +Su3QY5/zFvDo0cg1YauRwsJr8Zb+26b73zf1HBuRGIelGrkGb/DyxAfREhJyTmBW0Cw FlvA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WSurhNFf; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113593-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113593-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id vq18-20020a05620a559200b0078a22357ad8si4345976qkn.115.2024.03.24.18.11.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 18:11:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113593-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WSurhNFf; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113593-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113593-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 678401C24EFB for ; Mon, 25 Mar 2024 01:11:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E6C9C757FA; Sun, 24 Mar 2024 22:46:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WSurhNFf" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0DB9C1CC5FE; Sun, 24 Mar 2024 22:46:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320396; cv=none; b=OTYzZOGzhezXmGtmraygkDUCwX3Hq+hprnc9B9OrmddpfQcDGC66n6lR3TAXeejaANV8C/hHCSo2pf57P/tqhwUxerb4oN3u9iOEdTzkVcdeNf1rttSD3VU+WoR7V7utAN0Eg+6RLP0YMryE4AS9e3lQ0jRxpl+pfbFYGwPwLQ0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320396; c=relaxed/simple; bh=pn4y5dbLBF481EEZQxNbzho2TeYcoLbqwNeJkaBporg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PYyIEHSEpf+dU0L2yLAQijECvRqg5BjlEarl3Cpwvb+UWuX2unKx+5tTgnX1TI1AasBAek4qFRcpMSKcBVORcOqeVxhJ9gtmy47+R4Gx1dlOcVNnjir0/RSBA0ziejLNYTeN7LBCP6CfLG82ZFKatZTvbZ54OWhQ7fo1Ktz3c8k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WSurhNFf; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 53234C433B2; Sun, 24 Mar 2024 22:46:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320395; bh=pn4y5dbLBF481EEZQxNbzho2TeYcoLbqwNeJkaBporg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WSurhNFfWDp/daMgSMw0CazKgBNW6qHQsjniPMf8xKle51XNkxKa+o4fu37+wLnzq 2cqL+vfu3nCdyqCSYswNhBr04bfXGOy/LQimRzmIC85XnMp4N3nZqio1eB62NHQTl7 8qhBmareYa/v6+trqL8HuxV6ZIOKg8CiIMvaA8TUKCeyg+yHtediHh+M4SGMZs7C4L vLLYufTg58KJvspveznlS5l44O6w8R5Ya7VULMjgs5mq1K49kkZyaRi9aCWt2ZAeTh uk90LDUkbM6fSU9FRDNTJmNE3ugtVp96dQA58N77xEYtoiOYcYQMxyeIjl9rXN6NXp ThR2b7cr82bhA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Pablo Neira Ayuso , Sasha Levin Subject: [PATCH 6.8 702/715] netfilter: nf_tables: do not compare internal table flags on updates Date: Sun, 24 Mar 2024 18:34:41 -0400 Message-ID: <20240324223455.1342824-703-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Pablo Neira Ayuso [ 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 1683dc196b592..0fe2abf27d12f 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -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) && -- 2.43.0