From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59B68E7C4E9 for ; Wed, 4 Oct 2023 18:27:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244231AbjJDS14 (ORCPT ); Wed, 4 Oct 2023 14:27:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244237AbjJDS1z (ORCPT ); Wed, 4 Oct 2023 14:27:55 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5A03C6 for ; Wed, 4 Oct 2023 11:27:52 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EBFCCC433C9; Wed, 4 Oct 2023 18:27:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1696444072; bh=7R0226bYAGWtMYuby3wvApqmDGzlDegbi4xP87X+PUY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CuNrfRyrw2wUCP0y6cWc7iQOO9h1iClh1nx/Uxi8iTPW0WWfySbA7hhAwLjnuA8hk 86uv5U/ApHj2ZvK8PnVhBNj3BtQTvsUgL7pG2F2dUFtrswqwpv019AYy+qZGfRNg1t EncSB6q+KZI5y4RB3juNj321q/yvpte6GOxPKgGY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, "Lee, Cherie-Anne" , Bing-Jhong Billy Jheng , info@starlabs.sg, Florian Westphal , Sasha Levin Subject: [PATCH 6.5 092/321] netfilter: nf_tables: disable toggling dormant table state more than once Date: Wed, 4 Oct 2023 19:53:57 +0200 Message-ID: <20231004175233.477884744@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231004175229.211487444@linuxfoundation.org> References: <20231004175229.211487444@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 6.5-stable review patch. If anyone has any objections, please let me know. ------------------ From: Florian Westphal [ Upstream commit c9bd26513b3a11b3adb3c2ed8a31a01a87173ff1 ] nft -f -< Cc: Bing-Jhong Billy Jheng Cc: info@starlabs.sg Signed-off-by: Florian Westphal Signed-off-by: Sasha Levin --- net/netfilter/nf_tables_api.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index 3e6839c03bccc..976a9b763b9bb 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -1219,6 +1219,10 @@ static int nf_tables_updtable(struct nft_ctx *ctx) flags & NFT_TABLE_F_OWNER)) return -EOPNOTSUPP; + /* No dormant off/on/off/on games in single transaction */ + if (ctx->table->flags & __NFT_TABLE_F_UPDATE) + return -EINVAL; + trans = nft_trans_alloc(ctx, NFT_MSG_NEWTABLE, sizeof(struct nft_trans_table)); if (trans == NULL) -- 2.40.1