From patchwork Mon Dec 11 14:07:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Poirier X-Patchwork-Id: 13487289 X-Patchwork-Delegate: stephen@networkplumber.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="Pb+i7Uva" Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2067.outbound.protection.outlook.com [40.107.101.67]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D83B51FE7 for ; Mon, 11 Dec 2023 06:08:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gULcy0nnajBodBVq3aedpcWFce6SAXbO6wYV56ET68Y16znRpGouLI7uvySU3wE1iCc72EuLl3CW6LTt8EsAH0E1aFxdhTi5iiKQemlbVif2AqelWn8Bl3UwXHkTuZYMwCAt96ignFJGjPx2tyQsortyFEizasvNfEj3T3XDKvbzBIxEDDwQ0Tt35C5I1EzWLz9duusKcZKg79HKCJvrx6/nbVFkdxMzjQ1cIhK68oxGgGKzgoKsrPVffp5msUfROKLCyV+/FS3RFrAs+ScUOUb2CZutmQvEcoKWL1n1FmYrpqO9Ab5zC5ArfNZDyQ6D27SLmNdnEzDgM8yNdwYobw== 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=9YkmK2skxvSunadKnqDMwdQqx+jkTJF00s5q4EPTmmk=; b=K8f/Z/3ctHpgBlgR38/gAaMZmIC/cEvz7rR8a+facohgeopV4QhQYVuUyDMjAogY51QgoZp8YQ/3fc5YlgI/AlrDvRIL0KWRwEWSw00qSlXatmS2hV6DQO/QT8QUeeoxgJbhLuz1o7rzrpMAJprHEW7wLtwjTunwf5NzIH9qoEsF/Dg+g8gHEwHzlHlC3HYvOmF5B6p0AxkyPmCY0pLIG6OPdv8bhaPLkBp3E9hAttGBL58pJLcXZFug4iihz+feR/scF7T++5OGdbpACFTOlAeGyC0aBVRjv42Nzhj9mSLvDWYSmD7M/zz3Rm5vVsxb1OfyabUcy+47UQWhqHYYsA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; 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=9YkmK2skxvSunadKnqDMwdQqx+jkTJF00s5q4EPTmmk=; b=Pb+i7UvauxjLdqEu5+mfyZGLRKBggdzCrzu7D2mnVKV1IWh7T6nL6Lv84zZkYnN+9UTSjhj7sqFbPQ29dpkzzAO08NDcDBIyIhYwKRHuo4Vc2ZLv5Fyjnp4xzNupyG4GmZFxaoQjDVaP8YocXvxXgmk3hJToX9iWkjkinE1ziIRcYxBRYUWbEZeihuoMIjWKmn0oKohlF3mxv8s8TlVYNHM0vKddz5VOMWFBL/UopaORgmDCUbxfx0yxqR9wuNw1K4/RvimSdGDAwz7spRY22g+nI0mer+Kk5Lncmbeoy1Lo4/v/LP4XtJhXNqX+d+KgLbq7eICChYGkpLou0trvUw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from MN2PR12MB4373.namprd12.prod.outlook.com (2603:10b6:208:261::8) by BY5PR12MB4193.namprd12.prod.outlook.com (2603:10b6:a03:20c::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.32; Mon, 11 Dec 2023 14:07:52 +0000 Received: from MN2PR12MB4373.namprd12.prod.outlook.com ([fe80::ff68:f81b:d451:9765]) by MN2PR12MB4373.namprd12.prod.outlook.com ([fe80::ff68:f81b:d451:9765%4]) with mapi id 15.20.7068.031; Mon, 11 Dec 2023 14:07:52 +0000 From: Benjamin Poirier To: netdev@vger.kernel.org Cc: Petr Machata , Roopa Prabhu Subject: [PATCH iproute2-next 02/20] bridge: vni: Remove dead code in group argument parsing Date: Mon, 11 Dec 2023 09:07:14 -0500 Message-ID: <20231211140732.11475-3-bpoirier@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231211140732.11475-1-bpoirier@nvidia.com> References: <20231211140732.11475-1-bpoirier@nvidia.com> X-ClientProxiedBy: YQBPR01CA0051.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:2::23) To MN2PR12MB4373.namprd12.prod.outlook.com (2603:10b6:208:261::8) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR12MB4373:EE_|BY5PR12MB4193:EE_ X-MS-Office365-Filtering-Correlation-Id: 478f50a7-a4a1-4f00-e0ad-08dbfa5290d5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +jdgrRHvG8qa7LbMXFKiQvXyq5rg3i3har9L/b60PHa5foJ8AXbt+varolxcOSl1pF0hkvoJpOiFCtUWaajkC7W00HPp1g4ksA0px5/G7/WdyE3Cg276f+h7UDymWuSkmG1NTRvf2pQo7+qwIUrMZSd7Ak9a+toh8Q+HLKuCtkX+GOaJhQUVRtuwNmTELzcTLHWHXzkxDztm6V6W5oD9o76hMEMBdKTlRPHRG9D0BbnxrLiU1ANR43GBSnSnj41Z5Cb0CdnLRKs43tFrTjQ01+Jzly0IHMfKsgnKywiCphrFabUlU11rxM+XLO1dKxH/YlBElh5DULPN/2OUszHHxBSDTCLZ82TMuuReDdFOXRgSgKXSPKwjrBUeLpeKWu6kZCmBuy51u3tHqFk3vRDII12jgHhetlBVnnsGZPODZTHgwUaqP6QwS/lICzkkGK9M0ZLQgZ/Ha+UO8eAkZHZ90GIDsJoC5J4A8SSrVLShDIoGLXyxUOaEkq54hG7NhzEZrzHDjwxznD0upPb8W5E4tuzpMtZF9IHXCiAmIDaHQDSn8OdOcK0OSpwXCrTYTEip X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB4373.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(366004)(396003)(376002)(346002)(39860400002)(230922051799003)(1800799012)(64100799003)(451199024)(186009)(41300700001)(2906002)(316002)(6916009)(66946007)(66476007)(66556008)(54906003)(5660300002)(8676002)(8936002)(4326008)(86362001)(36756003)(6512007)(6666004)(6506007)(83380400001)(107886003)(26005)(2616005)(1076003)(6486002)(478600001)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: tgiE+iSBlIsxgCebb3bhdgNEXzlqgg9QBT5aTCjp/sm0ug17nO+La9jPBJQJfZaXGL40wmwXxX5e1WE4OuQIe0NjwYEzD/THDMJGGGcNIaXz6EdkcMwsPrN9wR5xCXXpqubMJHRxoyM6GL6zd3AAaPZWzlTvk1X3DEnIvBddrEjvRMckCkuMTX0pUi7Zizy8Mqo1uJU6+tJ8DOt39Cz6MF7se4y24pGOV32gSeKJc/Kpfa00gMhcszskL3L8h2lFwUsM4S7z0uaNDmJSz51ot5Fmwj4SkvN1Aia8nDBfJyj3JErV66l3zOkSwOs92WE6yDJvjBV4+M7NidWZDin9j7HtwqpHQW/dbBPlIENH5bHRYBO64TS5vTMQAYr4bLPUKtsd8d/78z7zo1Eqppi+9/c+5eNMTfAhBNoSMrLXTbBLXA0rH0SWhqWDf/gC/nsHjPfIu+BT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xQ2i1oao25v9AH47sPuz7k/xu9XOdk5XwYWUvaSaTnD4ayRJ6LQTHRZpbIn2CuPiQ X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 478f50a7-a4a1-4f00-e0ad-08dbfa5290d5 X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB4373.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Dec 2023 14:07:52.8552 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0MN1dsqN163zNQyH7kI0eKE8ajBDa78fG7N0Z6vDdXQnmfkp4JoUiGYqtNdLpU7U6x3jNQ9Db5YiZyZrTEH6QQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4193 X-Patchwork-Delegate: dsahern@gmail.com is_addrtype_inet_not_multi(&daddr) may read an uninitialized "daddr". Even if that is fixed, the error message that follows cannot be reached because the situation would be caught by the previous test (group_present). Therefore, remove this test on daddr. Fixes: 45cd32f9f7d5 ("bridge: vxlan device vnifilter support") Reviewed-by: Petr Machata Tested-by: Petr Machata Signed-off-by: Benjamin Poirier Reviewed-by: Stephen Hemminger --- bridge/vni.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/bridge/vni.c b/bridge/vni.c index 6c0e35cd..33e50d18 100644 --- a/bridge/vni.c +++ b/bridge/vni.c @@ -109,11 +109,6 @@ static int vni_modify(int cmd, int argc, char **argv) } else if (strcmp(*argv, "group") == 0) { if (group_present) invarg("duplicate group", *argv); - if (is_addrtype_inet_not_multi(&daddr)) { - fprintf(stderr, "vxlan: both group and remote"); - fprintf(stderr, " cannot be specified\n"); - return -1; - } NEXT_ARG(); get_addr(&daddr, *argv, AF_UNSPEC); if (!is_addrtype_inet_multi(&daddr))