Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2620353lqp; Mon, 25 Mar 2024 04:49:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWv52rnPAaxtMFRfQVPNz5rg8hzoTTSwDWXH1CJ/XT+Vt/wvzZevJDbuuqFVeEgkqzjQUoVQ7QKShLqmUxt71HRwn0/A3i4j3EBMi+eOQ== X-Google-Smtp-Source: AGHT+IF+0ZZpjbPX/BWyetbkP4/3+smMluLlxcDxNNyELcw/FlYlCZi9/lIJuCZ59W0xfSdcEJT5 X-Received: by 2002:ac8:5a11:0:b0:42e:f3bc:9d9b with SMTP id n17-20020ac85a11000000b0042ef3bc9d9bmr8645093qta.9.1711367359254; Mon, 25 Mar 2024 04:49:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711367359; cv=pass; d=google.com; s=arc-20160816; b=qALOfWe35kWND0D+iZtl067Ey8eiRxL27sDvz4nxe8SFKL2zfWydFEjBxWeMTii3L9 CRj/4WPfNBYqeVL0FQ5AyEO0VyZCTQ3PJYW8ieonlPRHp0JuIyFCtCoGVdS2efH8Vv2M fE3ZTLr7zoU3AQJetN+PM8nOWRASzgAjp6ESQD04CKfTO1RFZhCYIVuqUnwPTL41P1eR xTFCey4hGpqVczqI7ZrRSlieLKESopVtkBG9xGR5iJp//XTK66jSEjrIuabayAQVKyIK OKib//LEvX2+C/ERRWf0149yldwz/sAPep/NH4HAD+LXbznscCAmXvyZiiWLW2v0o91d Kx6w== 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=fhOKbJ36K0wVCqA1sAoccHuYpAG2R297wE7oED9PMWU=; fh=JCupzcIQwtmyJ2C2xrsc2nqgcJfRphMLLtiVBgyhfvk=; b=eyIQaZ2kQBK8xatowpxAKM5pgEsjE1PSN6CZdyGZFtz+UGtOf4XikpmQzeQclDnx6p v0BAC9G4V9UAGWfdqOIpjkL72TEself7fs+ghM2dd2CNFZVmsi2+14cXtR3FVqNsN3Iu 0sTJ57GrI/QDHc8ceG0opQmVy+OBK9CycoziDJicfgABLmv0j6uH85XgqOn+bzEVeo5/ vSQyAQVpaVelQv3fbG7+zm6vimhXvVez3nE6a+rdQVRFr8Rk38ZdbEnmwkeaYQqcmuhf peSccuuH6nbvs2hnKx6UXuxX47CS8m+yqRUp1iVWgRFSUVpDnV+0F1VDZ8TgGPOPs7IU 2MTg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DtEa6oHo; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116222-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116222-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. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id fz10-20020a05622a5a8a00b0042f4db1ba40si5285389qtb.608.2024.03.25.04.49.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 04:49:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-116222-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DtEa6oHo; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116222-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116222-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 112611C35421 for ; Mon, 25 Mar 2024 11:49:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 868023BFFD3; Mon, 25 Mar 2024 03:34:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DtEa6oHo" 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 49A57131BA2; Sun, 24 Mar 2024 23:44:15 +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=1711323856; cv=none; b=MZpP9aXFS953NGBMCvhob5I0lFMv7CL9foOoE5+dnWWq/c+QzBQxsZqzvxvb9o8jY5HV30pC5tkjrv6U+IiDbVuHQM8X0SarmeYEr16nJi4zUvJtLkB5RajiIRZlWgtckOtIcDPbBrf1QAZkzaMAlt1AcnUUnIg3MnwvskcTeek= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711323856; c=relaxed/simple; bh=HFdAVBCshBhE8RfYVfDJNWySv+TBfnv031oELRS2nQk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WUDGAy1TAaXHfam1CbXGJKPm/OJGtbHBF+tOoHVmjvIIzIfDzkkMP9SUk23KcSiTGh0RxKWuiMtsC//X93MQc68g+UnyA+1wzA7GHnfoz8cBeB1JDH54xI/Omo4VjvR868Wzxs/c0Q2qIalJeLaI3wMDOVpBqyaOTJlcf/Y4tOc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DtEa6oHo; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 953B7C43390; Sun, 24 Mar 2024 23:44:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711323855; bh=HFdAVBCshBhE8RfYVfDJNWySv+TBfnv031oELRS2nQk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DtEa6oHopPTxkqp8YD5Qnubf8qkYHdfdyGMUHeO52MGomUJhhy7Lu/PqnJJHpmZIx f243u9HdaivS7yGB6OJ408EnuqbHV/4UR8PZTfBslbG8DtOt1F8yTVgpZ/ItCnkHiM nn6VlnCi0DHrUdgJShpWlfDeLW2jifbo8e0BeF0r61K/UT94nl6zyqErH/7FZwr6pE JUYB4NRdB3m+JmXPCAtoXgbx3K0PTIDl5jFjrkkL7VUrT6yL2uGvikKI3WEg4qOvZq Q195W1JOoTmLBD0huRaG90QC3XjTGHBaXVam1yeBLEY3VfzKc9EqsW9gcmjrAiiUaB jhjwYcVgdzKhw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Pablo Neira Ayuso , Sasha Levin Subject: [PATCH 5.10 233/238] netfilter: nf_tables: do not compare internal table flags on updates Date: Sun, 24 Mar 2024 19:40:21 -0400 Message-ID: <20240324234027.1354210-234-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324234027.1354210-1-sashal@kernel.org> References: <20240324234027.1354210-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 73b0a6925304c..8d4472b127e41 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -1097,7 +1097,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.43.0