From patchwork Wed Nov 16 07:33:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roi Dayan X-Patchwork-Id: 13044456 X-Patchwork-Delegate: stephen@networkplumber.org 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 8140CC433FE for ; Wed, 16 Nov 2022 07:35:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233043AbiKPHfh (ORCPT ); Wed, 16 Nov 2022 02:35:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232864AbiKPHfE (ORCPT ); Wed, 16 Nov 2022 02:35:04 -0500 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on20630.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e8c::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0DF313EAA for ; Tue, 15 Nov 2022 23:34:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PwUWmpXSBKMn+9YR7Qr/z3ujhsrAR/zK5IDS2ERMG66XtwFqOmt6TbYb40NF4rfqPM6pN99QHI4VqEHsAivdEsKOXq2zu+CecjBnvvwgYDRxe4oW4lzkicVZF1TviuCx4Q1veRlbW+C+7K5VraY2GVZPnOSAXebDNE+lVq8YDbQgLlk8ry4QTBOq/t+xsYzPq0s9x07QZrLhadxgcTLJDLIRz0K+17vXNN9iWqUONc0+yHdCnnWwunsoOj1gN5XXntGrdH/ueZOzoH7UtFwaDS7bo8XEKdJc2c6uNzcMQwtKCCWuwBoOnh76qAbP3Whz7R8zSANF62/o1vYK299bMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VtvF4AmCy1BGWCNEoJcMXDzzM96AImoN0rZD44NPlbY=; b=UU50APM+DkjXPv72T15vyw70YlNzWyVMCdpZB4HdIdf8XVlbM22GnpUDZY+iCRh/YayZAvxGRoOMqe0LGLhkW0xFIivJR0PN/f2wq+IBxmmwpRFj9COnZOa9u22d1hUiBzHkIYBAQZBXRthyYcp/IGTHvC26e28l8/7csll9fAP7ggKZG5aIWlh5gZN+8aCxsCGZplHJdtSFLenaLdnm2B6n97eBqUWERia3piQr3KMNCdhqEL9ig3xIN+tV4cfFkZRSD7Q3dtPluyPv/vgmIy9Zz+GtXhm/GgqUa/8cgv12X2JluOtIL7QcYfHFq9giHux6oMFAR/tPx/XKovFM2w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VtvF4AmCy1BGWCNEoJcMXDzzM96AImoN0rZD44NPlbY=; b=RKVffFlYhO+glY3grjtB7RItxe7+CxM1PAO4yFZE1wEI5GZkDBB8qf1zuvhiAG0nY23hyKWncpArEIlnCPKz0/D9V6VA2jAyYGP8eU8q95Fhf3ah4LGZMBtykvDiEjIwdGRQpdPU0wF67xbVMkB7WdJpDKIalqdxZGrj84WEG/7l0nPfyRRaeDsPRfexfiDpVvCuPAaRGGh1zg2BwFOzxGwew7UCkcUEx7L8DWd5bGuygL7040cnCZbHozCYH8nXbTdzHXK7Krej2p5hH6GUCDHvOqZ0Y/iXFDAZMRyGfi637BtwE8kx2TG1vpzA5vnh/pZRmDr7VShDI6JaAhFwmw== Received: from DS7P222CA0006.NAMP222.PROD.OUTLOOK.COM (2603:10b6:8:2e::23) by PH7PR12MB7428.namprd12.prod.outlook.com (2603:10b6:510:203::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.18; Wed, 16 Nov 2022 07:34:01 +0000 Received: from DM6NAM11FT088.eop-nam11.prod.protection.outlook.com (2603:10b6:8:2e:cafe::49) by DS7P222CA0006.outlook.office365.com (2603:10b6:8:2e::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.18 via Frontend Transport; Wed, 16 Nov 2022 07:34:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) by DM6NAM11FT088.mail.protection.outlook.com (10.13.172.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.8 via Frontend Transport; Wed, 16 Nov 2022 07:34:01 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Tue, 15 Nov 2022 23:33:38 -0800 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Tue, 15 Nov 2022 23:33:38 -0800 Received: from dev-r-vrt-138.mtr.labs.mlnx (10.127.8.10) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server id 15.2.986.36 via Frontend Transport; Tue, 15 Nov 2022 23:33:37 -0800 From: Roi Dayan To: CC: Roi Dayan , Paul Blakey , "Stephen Hemminger" , David Ahern Subject: [PATCH iproute2 1/2] tc: ct: Fix ct commit nat forcing addr Date: Wed, 16 Nov 2022 09:33:11 +0200 Message-ID: <20221116073312.177786-2-roid@nvidia.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221116073312.177786-1-roid@nvidia.com> References: <20221116073312.177786-1-roid@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT088:EE_|PH7PR12MB7428:EE_ X-MS-Office365-Filtering-Correlation-Id: 21b2057d-9f60-4665-8dc0-08dac7a4ee51 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8wiZRDiBb92Twzhnnn7bYmOFYhn4z3VHnHttzl0H9n1lWyq1zBzOXjcg5i/nhSeTJmocvrqmF9LOrHAMbBmUKwTQ44RpxEVUO3umoqSmm2C4KnA4xgFTxHa+VlhEdRAMSkZ6urmjnRN/+3RwsIsK2gJZb3rdORcBVNs+D/rfr1hXyjNrluYnY1xUxAlTYBgUIABqvv8NXr5nsCzxg3eVuqkGm2Bm7nqKCz1Zdo1f9oPsu5vhQp8DRegdSfcMuD5/XL4y+VoPQ/RK4I0+lZiQIllnMdg43Ayuxm8i5BOQv/oYVHM45vqdhGWpi+1wQq5Q/7UEbUSZqBfNyaqCKmUUPFBAGE7xrZAB0IZivrYGV8sSy83eSR9FAX9JSWbPHKKBY8F1tQbmQ4OUwUaO4R3whDMfkb0eomIcYftl0oDz6tY+atjA2gc7iAh3QWfPyrXBXU9Kj0d4g4S0dHak++R6lNOvmZPR2t6gGdZoEL+qE9xiHlU2APexMPr1y4htcnnnRS5F9fDLvWC3yVigrAfebE+3AztAmnq5eoXIuP3j10vVYAx1uxwRQuQw330/fYvB2WAS5SL3wU5Cdqt4FpClHzsN4/cBYQTj+5Ho0fF6V/oO1w8iLG/uNYrj+EVbX+wvaWt5nP8f1vmhnUCCwv+cVOM9lXs8bX3iOlNvHM3fQgCFYGAggg+RE/Mck54xp9/iiHu7H13GKu7Z24Cd6+wdmV6Pb27X92vnGFyW+Yx9FbRMl1M256P5tkUefZMD4mVwuAwouHFPlDA3g78WBaiNOQ== X-Forefront-Antispam-Report: CIP:216.228.118.232;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc7edge1.nvidia.com;CAT:NONE;SFS:(13230022)(4636009)(39860400002)(396003)(136003)(376002)(346002)(451199015)(36840700001)(40470700004)(46966006)(5660300002)(40460700003)(316002)(6916009)(54906003)(41300700001)(1076003)(8676002)(4326008)(47076005)(36756003)(336012)(2616005)(426003)(186003)(70586007)(70206006)(82310400005)(7636003)(82740400003)(83380400001)(8936002)(356005)(36860700001)(86362001)(40480700001)(2906002)(6666004)(478600001)(26005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Nov 2022 07:34:01.1670 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 21b2057d-9f60-4665-8dc0-08dac7a4ee51 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.232];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT088.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB7428 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: dsahern@gmail.com Action ct commit should accept nat src/dst without an addr. Fix it. Fixes: c8a494314c40 ("tc: Introduce tc ct action") Signed-off-by: Roi Dayan Reviewed-by: Paul Blakey --- man/man8/tc-ct.8 | 2 +- tc/m_ct.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/man/man8/tc-ct.8 b/man/man8/tc-ct.8 index 2fb81ca29aa4..78d05e430c36 100644 --- a/man/man8/tc-ct.8 +++ b/man/man8/tc-ct.8 @@ -47,7 +47,7 @@ Specify a masked 32bit mark to set for the connection (only valid with commit). Specify a masked 128bit label to set for the connection (only valid with commit). .TP .BI nat " NAT_SPEC" -.BI Where " NAT_SPEC " ":= {src|dst} addr" " addr1" "[-" "addr2" "] [port " "port1" "[-" "port2" "]]" +.BI Where " NAT_SPEC " ":= {src|dst} [addr" " addr1" "[-" "addr2" "] [port " "port1" "[-" "port2" "]]]" Specify src/dst and range of nat to configure for the connection (only valid with commit). .RS diff --git a/tc/m_ct.c b/tc/m_ct.c index a02bf0cc1655..1b8984075a67 100644 --- a/tc/m_ct.c +++ b/tc/m_ct.c @@ -23,7 +23,7 @@ usage(void) " ct commit [force] [zone ZONE] [mark MASKED_MARK] [label MASKED_LABEL] [nat NAT_SPEC]\n" " ct [nat] [zone ZONE]\n" "Where: ZONE is the conntrack zone table number\n" - " NAT_SPEC is {src|dst} addr addr1[-addr2] [port port1[-port2]]\n" + " NAT_SPEC is {src|dst} [addr addr1[-addr2] [port port1[-port2]]]\n" "\n"); exit(-1); } @@ -234,7 +234,7 @@ parse_ct(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, NEXT_ARG(); if (matches(*argv, "addr") != 0) - usage(); + continue; NEXT_ARG(); ret = ct_parse_nat_addr_range(*argv, n); From patchwork Wed Nov 16 07:33:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roi Dayan X-Patchwork-Id: 13044457 X-Patchwork-Delegate: stephen@networkplumber.org 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 7F9E6C4332F for ; Wed, 16 Nov 2022 07:35:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233125AbiKPHfr (ORCPT ); Wed, 16 Nov 2022 02:35:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233064AbiKPHfK (ORCPT ); Wed, 16 Nov 2022 02:35:10 -0500 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on20629.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e89::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 856A82701 for ; Tue, 15 Nov 2022 23:34:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=boooMHU5VgPnr1qbcco3iNnTwkjawe6Kg9m8bk+ZarI7tqitRuiWGIjPkH9m8FdV29vXEc8II7JhX4SD0hEpVjfVdbfOaUof5Jk6EPyQrwL2kRp1M6lN9P0QkGWAG0mjZ9XeURTy+pWb+vrYMUBK3Piip16qKURkLKsIdjzM3BcfE9XrTMNelZ9Q+D3jK6VFogbvHX7Ur9eUq5yxPeY+ojaz6TJIyg3O+gQmzkVS7kl+KgBmgj41EtuwgKESD2W9DvpIPYM5dQJ7PTqRaI56xRh1OXLq+rPKwYfibqxgU5PMW+6f2f4fy2Smd3vMq8oKrkqRpU8lbPU8BKwqVwebjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KG4TYHJVS7VkZHjBwO0CTNYVDUeyxluziJH06oNon6I=; b=nKERya+8Wi4GMrflmBzy0SzcbK/uMmPIt825ELMxwiX3X6+qPbyyfy3joheq2bK0AaokMME1x3e6cE0TAg3qp4l2OofsOf4KnFa2pJXJqDDivhobGtTeA3QA4/lPffbcyOAL7DjHs44+yd01jDNu7KYhbAIDZvqpRMJ3IDLZuCIZ3nCgx7tzzfXNlB5hON3fSyPhEG1+/npWvUDoHLFFZaLa2CiJBb3jeJuqtoW6v+b3Es24QJSwrgd5k0bW+f1hJi9zsdDm2t2Gfh6aqZUIcepF+o7mRGbvl1I0lon2jqurE7giOtHusU985BUt71iHxFZSZoNyUL9U8jc+cjzpKA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KG4TYHJVS7VkZHjBwO0CTNYVDUeyxluziJH06oNon6I=; b=nO5poj4p7558OxLH5Cjrju4MxH2MOt0DRHlTNKkUC7gfCAPxg5iie0hyBRPAPTNioGfVgQDDLCbZQrFhBTKP9kaFwn0/TIz2FzjK4c/s/QpFcHG544YDQQWR4K9XMYse4+Ur4Fy3rhobEGI4zMi35hDK9KUtJ5kgvfDUKSjH0Vjfpk/h/SmIBpQ3WZgz4qnIjOop/+4oMf/DB23L3IuwAk7w0NpmP0WVoKeNZmx9z85apy86bEJV3oXF5ktzCsbkrFMO5U06DPuPsvg9gezqwofOnGh2NCozkPieNPS6IY+hYKtSMMWFw/BgWVtBfeFFydOELGrI7cGm5G9gf+kg8w== Received: from DS7P222CA0027.NAMP222.PROD.OUTLOOK.COM (2603:10b6:8:2e::35) by MN0PR12MB6032.namprd12.prod.outlook.com (2603:10b6:208:3cc::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.18; Wed, 16 Nov 2022 07:34:02 +0000 Received: from DM6NAM11FT088.eop-nam11.prod.protection.outlook.com (2603:10b6:8:2e:cafe::74) by DS7P222CA0027.outlook.office365.com (2603:10b6:8:2e::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17 via Frontend Transport; Wed, 16 Nov 2022 07:34:02 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) by DM6NAM11FT088.mail.protection.outlook.com (10.13.172.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.8 via Frontend Transport; Wed, 16 Nov 2022 07:34:02 +0000 Received: from drhqmail203.nvidia.com (10.126.190.182) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Tue, 15 Nov 2022 23:33:40 -0800 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail203.nvidia.com (10.126.190.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Tue, 15 Nov 2022 23:33:40 -0800 Received: from dev-r-vrt-138.mtr.labs.mlnx (10.127.8.10) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server id 15.2.986.36 via Frontend Transport; Tue, 15 Nov 2022 23:33:39 -0800 From: Roi Dayan To: CC: Roi Dayan , Paul Blakey , "Stephen Hemminger" , David Ahern Subject: [PATCH iproute2 2/2] tc: ct: Fix invalid pointer derefence Date: Wed, 16 Nov 2022 09:33:12 +0200 Message-ID: <20221116073312.177786-3-roid@nvidia.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221116073312.177786-1-roid@nvidia.com> References: <20221116073312.177786-1-roid@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT088:EE_|MN0PR12MB6032:EE_ X-MS-Office365-Filtering-Correlation-Id: 7141626e-4bf5-4dc6-bfe7-08dac7a4eee7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: d8hSWmlDGzeCyBna/ZPiQqXCETFy8ZHDBoxd12m9jX49j7JNVGT3rwJjOue7+O0621MGeJqFRbdJUZScpFSWiL9pIm+U5opGOz2a1XOV+j44g4z6xKqpeE6c8BA6dzB1f9AfJJhNC5jjVlh6G5aESw0T3gYqivvEUiYs2cZxF3rLRiRGmWY0hcefokLRxel3jXwmtSsatO//ul9mvujZ/PAk7k+maBP+hdv5/c848prSsdznnkcCqbdrnmGEjaBKikokF5guuNoWPf0Jb6TLdy8bpQi0CMCssK+tXIxjUAKzR26XRZKf70x3f7QdIqC/tLpfLZa1His91KdbQqM3FehlKjQda2pg2LCADSnowjG8y1FtlGNdTgXkYKGkP/jIhw+fchaGfSlV4Njz9kb5XIDqkGtL9rXyCDXml8dtPfAklnMytdV59SUEAkP5//+tT0AoWukhcu/sHm+8BnRl63p20XcAwqQhqF+6xgUnwksmmlTS2mhzxT3GrXxtxQToeLZRvgzy8WhxCxED0odXhHlWGWM0v2rV84fCLTQFP46mu3eFdlqmcY4fQaS2MdH4QKmaU8EKQ44eNs4EHTmQLcMBjPdFp2sjMSeBQpz++yDdWkG1Ba5OM2ou9p3imjpjdMMqo8roI33Q4O6mqhzk8BzXHsFAkVBRtrIyz5gm68xekmguVeUO7qfVKSQVl7sP+8CgD102ADfF/+P01FVaxY7IKHR6+dKbvRQxzOTwFE78GXRHGiGozeoFfJliONzQGaNfhGjp9SoL2IcORL1i/w== X-Forefront-Antispam-Report: CIP:216.228.118.232;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc7edge1.nvidia.com;CAT:NONE;SFS:(13230022)(4636009)(396003)(39860400002)(136003)(346002)(376002)(451199015)(40470700004)(46966006)(36840700001)(478600001)(6916009)(54906003)(6666004)(82310400005)(70206006)(426003)(47076005)(40480700001)(356005)(86362001)(82740400003)(26005)(316002)(7636003)(1076003)(186003)(70586007)(4326008)(8936002)(2616005)(8676002)(4744005)(36756003)(5660300002)(336012)(36860700001)(83380400001)(40460700003)(2906002)(41300700001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Nov 2022 07:34:02.1669 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7141626e-4bf5-4dc6-bfe7-08dac7a4eee7 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.232];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT088.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6032 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: dsahern@gmail.com Using mcaro NEXT_ARG_FWD does not validate argc. Use macro NEXT_ARG which validates argc while parsing args in the same loop iteration. Fixes: c8a494314c40 ("tc: Introduce tc ct action") Signed-off-by: Roi Dayan Reviewed-by: Paul Blakey --- tc/m_ct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/m_ct.c b/tc/m_ct.c index 1b8984075a67..e1c4b822f8ac 100644 --- a/tc/m_ct.c +++ b/tc/m_ct.c @@ -243,7 +243,7 @@ parse_ct(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, return -1; } - NEXT_ARG_FWD(); + NEXT_ARG(); if (matches(*argv, "port") != 0) continue;