Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp297566iog; Thu, 30 Jun 2022 00:36:34 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s1MABNfODHczYeiq60BRfslP0LN9vtD4DLVXr6U2a/V33l9nYTlE4NejlGvp5KwspPpF5l X-Received: by 2002:a05:6402:84a:b0:426:262d:967e with SMTP id b10-20020a056402084a00b00426262d967emr9460126edz.286.1656574594500; Thu, 30 Jun 2022 00:36:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1656574594; cv=pass; d=google.com; s=arc-20160816; b=UriPGRRbJpEvv2OtVlg1p0a88lIlEKm4BUAoJw6njWlBDKIrhre/RhGBtiudoAY68G ZH6GJK7nyLlRSiV1CfIgeoQNLEe/LGMUScSXxtyb92C82f5h3cM4G21FwiIo1Ohxt4fa qD42hMHd1S77E3QJb19NizEnGrTKorFA4Whl1oSNzHMqIRCxBfIuah/uakwGxUYXT9nU 5B2Srb4nGVspR9KaK2Xr0LsnTd1329+/EO0a2P+Z8YZaodunBTKW15EBB91NVvLy+S7S 9Rd4MR5Wr1xABGOvZsPtw+1Q/tlckAfAXKMka6afl9aoASN1mxJ7Pzrha35F3AkLQXUu lCRA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+9l2x6iNzwxrKvaY7rqNsjt/pw5D+s+cfYK5WHfIwNc=; b=EeKTWNNoLDi6jQDW5Z9UX6alzmL7sN/kagf+n8DLax7wDC59WAA3KqtdDB3sPCOIeh eLFmvNzMk7pvhcf3EhJ6qLABFgMpAdBli3tCMauL1l+hlhDYoG2S7PbKH+TubSs8Prar oyhS8CiyYwBCMslLHGX5CZZIQiUPmdlqFOTP/HII9MeaUurUbuVNv61aXYSYtwuKzhuX 6ED4V9LPxt1A/+GYgrIZyYoFr6wFEwqs302bj6P0XlZw7YCRDEpuqbBXUmeGwz1JqpI0 My5iMzYqly6TZt7dvT0RwzUtzBW5YbJ74LPJslABJX4auxKAZOk6dlIhIE0MKxeyI1Cl 5Pig== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@hotmail.com header.s=selector1 header.b=uinikouh; arc=pass (i=1); spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hotmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a42-20020a509ead000000b00435726c3651si18828309edf.101.2022.06.30.00.36.09; Thu, 30 Jun 2022 00:36:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@hotmail.com header.s=selector1 header.b=uinikouh; arc=pass (i=1); spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hotmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232473AbiF3Hah (ORCPT + 99 others); Thu, 30 Jun 2022 03:30:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232449AbiF3Hag (ORCPT ); Thu, 30 Jun 2022 03:30:36 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05olkn2025.outbound.protection.outlook.com [40.92.90.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EF631C928 for ; Thu, 30 Jun 2022 00:30:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aZKApD9/+U63HDfwn0oadpOK2bV+wdkFCYl169A6WoXqZolgV2930/hndZE5qGV/UfZESz0KUe5wt6s3atUn7gUOcV5VUS3/bSTi4sFElz/urxv1SEwFXDQz6jsLKzN0naWQKzZ2oEai9U1SGrRL4N7SZXkijaFWIp01pFtpwkFPt6HBs5HZpznNm6BWn3um+TrPj+Kdn+InGUD6mHBVDljjrnhcVPez+J4xxYAEaifa7momNRI6LdBpvNmlP5vvnPTLQAgWWQNA+Vc0iEUw0Yzw43HJgnK7T0+JISpGtG2Jpa2Ft4fhHXxCGba6uKYLwIIeWV/mgomgl63ReT41bA== 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=+9l2x6iNzwxrKvaY7rqNsjt/pw5D+s+cfYK5WHfIwNc=; b=PsUEBj71HZpvM0hwRgE3ZdEdNM5ld0WjFXQ2m9/7RDm7btjq8X4l6s91kix7z8hxvxh783b392QyBeg1krkmsNE09JtJ8vZ7U0x1tP0+YREDdPlVu+iUEK8xtC4PgnZFchj88J/LyTvxH7hzOcFepbq78yC9k18PTsb28RB0s4xGO6RiTiZtaRGRYBpY1SgXMyhP61ic29HlYS2rdU4AnBGxTEOQOp60ZnJJ28yRxKwE3kK0CpOOl4pF/YZIeeU8bOfnJBi79N+Vrn9ubb3dglLQuGZLR04obyJG6UOT+A6IkoO1f3BIp+QN9ALAY1QNUtEqokR8fPeEzVe/53JvTw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+9l2x6iNzwxrKvaY7rqNsjt/pw5D+s+cfYK5WHfIwNc=; b=uinikouhsu5J0H8q7JQWthNx1i372c9Fta55B8ydZPjUco3nesJRrcyygnRGL+OkCDYPumbC9UmzVPCsTFHYmf3Q9r1dPxEYpOU3SjM7b4YqshEhvheLAFcYkZklKdi0j3SDIL4Ty7W5E+wWfl9o/2BwEsUwEezVIa9kfPWA0Dbf884Lk2ad465bc764pFqO4QRMtiLYp+hOOC/Gd1sgdb60BAdmYTn2FMhxe+WHeFVoO1z/Fozw4BNruTcAPimR+sZIEToNGOSOIBQv8Leov2QNUDjpiz4AVJMNbEI1TFXIx9hIpqCxN93gf9ia11QgqUYEmcSQn9ORyAKzVGkmMQ== Received: from VI1PR09MB4239.eurprd09.prod.outlook.com (2603:10a6:800:12f::23) by VI1PR09MB4238.eurprd09.prod.outlook.com (2603:10a6:800:122::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.14; Thu, 30 Jun 2022 07:30:33 +0000 Received: from VI1PR09MB4239.eurprd09.prod.outlook.com ([fe80::a854:d1b9:4cc2:f422]) by VI1PR09MB4239.eurprd09.prod.outlook.com ([fe80::a854:d1b9:4cc2:f422%3]) with mapi id 15.20.5395.014; Thu, 30 Jun 2022 07:30:33 +0000 From: Isak Westin To: linux-bluetooth@vger.kernel.org Cc: Isak Westin Subject: [PATCH BlueZ 1/1] mesh: Use correct net_id for received CTL messages Date: Thu, 30 Jun 2022 09:29:19 +0200 Message-ID: X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220630072919.20890-1-isak.westin@hotmail.com> References: <20220630072919.20890-1-isak.westin@hotmail.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-TMN: [4pFwMcXKPvwRfkHrSPJgwRO0kHlxpNia] X-ClientProxiedBy: ZR0P278CA0051.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1d::20) To VI1PR09MB4239.eurprd09.prod.outlook.com (2603:10a6:800:12f::23) X-Microsoft-Original-Message-ID: <20220630072919.20890-2-isak.westin@hotmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d68a0618-4858-4cf7-310e-08da5a6a6ace X-MS-Exchange-SLBlob-MailProps: +LiGfBxqLEthM4Yqklomr3cO6U+d/w6UAVjkhstBczaOHDHlAMUj6/KCsdOP7DYriMOd5V/TvTmrqNgr5w70Xuh5xs+XF6GL3h2T8M3FVp8n4TnSI6XvAAx5bmy39ZOW51NuHqHAQCaTaYaD2ugB7JBpg+EmmSRD8LfgkTvbDWk448gsY3cOKWmP5m3TYGDs4mmMf+ZevBX32AVOWH8qZHJ94zzqC3nHToSc265au6eW9CUi6qfxSu8mcVDYfzAlXN5K8Nn9b7JxIidtUIojdekGO+Pg1N3tE1srpv12KxYSCmw/0DF2gm9u9OA1WQUQ1pL1efaoga+DcIzbq8qYoIXDB37TCYEWS4GqWCmOgmwVLueOaYOuNtEjyNFYdhZAtOnR3OvqdcFbbm1GiO7/7+StN8kjzXDReF4SgDzLzxtpeUABQyc7GQb4aOE7w1sdWqbZHq8sXm48UQN+k7AAwCaU8XRaKUZ1wTYopotA38/QNp/zihCkr0phKM5QVKC8OcduDdFpLQjHvM/ek4JC82slwldAvPfTUfCx+dTZKF+9KK61w0q87zNcuKMWq0++g+LDlQDc8Imvo5hbsq3ANkeO3o0HuzQLFegZgtZ2hC9obtDR/B+27wEn/rrhNbnw3dyVAvN+erxUyioiKf85Juq6UbceQyowVriyj4FmXpSOm0/CVKRAQ8bshlq6EEkx8g5Gjd88qIVY2VJPTkie1ZImXojGUHNiEqthrcNXP4y1dVBpyvP1WkWe2jbgiGjR7dfL1NHAJmWYIF2TxIrbqAeZLRuK+BN/ X-MS-TrafficTypeDiagnostic: VI1PR09MB4238:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BfQR6+gAJS8L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HErJUUez0b0OK/M6j?= =?us-ascii?Q?0jT/+UBM6inBpZJrY2idRx1qFLuIC7bEUsRYxro05anex4nydNoKSCc2mdoR?= =?us-ascii?Q?OYEI/Dv+kMgge/EicG6XcLJKIZn9GxHIjDCVZf9GDA=3D=3D?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-64da6.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: d68a0618-4858-4cf7-310e-08da5a6a6ace X-MS-Exchange-CrossTenant-AuthSource: VI1PR09MB4239.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2022 07:30:33.3464 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR09MB4238 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org For received CTL mesh messages, the wrong network ID variable was passed to ctl_received. This patch changes to the correct variable. Also, changed type of net_key_id argument in ctl_received function to be consistent wich the whole call chain. --- mesh/net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mesh/net.c b/mesh/net.c index 8ff3ef32e..e8e6d3a61 100644 --- a/mesh/net.c +++ b/mesh/net.c @@ -2028,7 +2028,7 @@ static bool seg_rxed(struct mesh_net *net, bool frnd, uint32_t iv_index, return false; } -static bool ctl_received(struct mesh_net *net, uint16_t net_key_id, +static bool ctl_received(struct mesh_net *net, uint32_t net_key_id, uint32_t iv_index, uint8_t ttl, uint32_t seq, uint16_t src, uint16_t dst, @@ -2347,7 +2347,7 @@ static enum _relay_advice packet_received(void *user_data, net_seqZero, l_get_be32(msg + 3)); } else { - ctl_received(net, key_aid, iv_index, net_ttl, + ctl_received(net, net_key_id, iv_index, net_ttl, net_seq, net_src, net_dst, net_opcode, rssi, msg, app_msg_len); -- 2.20.1