Received: by 2002:a19:f614:0:0:0:0:0 with SMTP id x20csp34535lfe; Fri, 15 Apr 2022 18:09:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqpbHo0qEW58p+iJS+b7o5j7ykuvu36HQP/f1xlpHGHOUOqtxgpP4MfHn6Fi9tiEQFj+bf X-Received: by 2002:a17:90a:8595:b0:1bf:4592:a819 with SMTP id m21-20020a17090a859500b001bf4592a819mr1545516pjn.183.1650071348656; Fri, 15 Apr 2022 18:09:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1650071348; cv=pass; d=google.com; s=arc-20160816; b=GTbpa1AlyDL1kpSMdEnqE0apTd6w2xBYqOvBODf02Apou9+FjgadzF5NBg4Kvys9dl xuEdAh56lw+ypfPfTkJU5WvNLU/ClD3C+y6dQGrJs9ixFPwQUMDeN/ZH7K88s0MHWGxS kENdJ/C6P4aej0ZO2rDnyWPXnzCHPns1GKCxxdiXgNqYxNh3AFXZiQwmALCzTrkiQRfS R/9Ey91ySoJmM7TUm02B/ZWTEF3PZvcjAaxrarWUuM8haN/8fnonoKHg3Wdh2qiEjbPO qvbePOS2KE/KiUU/KQWwlZglbHoXZD42fGtmNDZWn/hZM2w8nEHBb3fUBPomAh9GNTIj v0hA== 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=wP17piyMWu8n/6WwmwZL+LsrIHcpAmXXTuIGu5wEhSviJM7vW0M9INZFFuq2ZfowSi 2s6gsqF2hHojZWWwV2DmKTb2IxHGpYx2vWlOxm4jOsucQWvyoZOS17lGi1f139DtEZQ5 Rqy30z+EkW2mY6HmhebjV6Fl6iaI7qqcloteIqBI1Jf0jJPwF3EnnyeBZUnlnQCjxmXT n8bPdCBoVjZP3V0J65L7EkiiVnRo2OZf4XiBMX7D6wDQL8RZm+2PaeRP8XAYi0TEx5aO S6boH+Pwla4umExuIBzPu2tp4CommhgADM5/Hh85DdrfbKKwjl+0uv4QPDlNg8Uyc1O1 FxsA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@hotmail.com header.s=selector1 header.b=iyrLxmqo; arc=pass (i=1); spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id y187-20020a638ac4000000b003816043efefsi2591930pgd.484.2022.04.15.18.09.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 18:09:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@hotmail.com header.s=selector1 header.b=iyrLxmqo; arc=pass (i=1); spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hotmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0874E12C6E3; Fri, 15 Apr 2022 17:49:17 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355913AbiDOQqg (ORCPT + 99 others); Fri, 15 Apr 2022 12:46:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355916AbiDOQqf (ORCPT ); Fri, 15 Apr 2022 12:46:35 -0400 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-oln040092074063.outbound.protection.outlook.com [40.92.74.63]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FC63DCE21 for ; Fri, 15 Apr 2022 09:44:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EH8g7TKbpQzkwPJFL3OtS4ZYwSRU0gjgf23NhXEc9iLcY/ZOoKuQtlebP77f6vXPLBOfhzWVuER0qIWAOoAvXSpyXQ4s4+GX2RfmWfZ7RZzMEScGlSt3VG3BPZN6Thj2pNJIFW4nreNZxBcijWqMcSgLOYRX1VIpzJseMv+PAk7WJ7p4hVF/F466wjyyN/o6qP68I7zzqe8HVKvkVfiJX+E571jyao4E0JEGdrrvov6bjWz1VZSSPANLAlgeDeA3eIpAaJIo97J2+EFE9tsDv/qsKyIfq4NLjl0HVzOi7ErPz+QL+oft7G3e1Yl8Tl7UPGNd3TtXOxR7sV7nMzbLSQ== 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=j3Uxipg9KNum229zWiIc+nUs2UHHIiq52MuAEstJ/Bky7IAX/LbSqEN81Wt3ILlIURQSzKdeGWn7T1SJGS3lLadwFyA2CFn2MrYuz2Azipgslm0+CGLN4e8FN4l7cmrh9OlFOb82FRNDvHUHZ8nPIJ2MajknbDU5JDBD1E5Hm4k0fDwiF1YLcSH8rGrV4eXg0z0Dt5WGL3K70YY+lqfo9Q8eOJQoLT/IC0bXWbCMxi5NKtAo2iEF0UORzmuV42quQxebuolxv7A4GJKw0hU6ZE0hLZZqasaPmXLWMRpDPSzLR5/i3id2P2G+UrQBoiDt26SgpIQ05cWaB6G7Jzq2jw== 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=iyrLxmqoWSLNvp0uYNUkRhVYCXhyAGO3l1yBE1jh56oRqehNumw/84xWhRZjWww/vRmnS25EhoMYInmGxDsRRp9NMi21TZqaXKVw1RXkGFWNbkuX0Fw7bzTFOyDc37yWP7Lai8u00ZG/Pm5fOT1gLIHwbSLDe4OgdSi7xoj470HEL77lWTPdQyMC+vUnFZWgeAYbEbJnPT7tJbnlmuTljVJUBteMGxDghTiQk4P/429wVVeVCnHsNDArn8+4tRydHP2C/wZjyv15/7lWn2NOTjoA9llXE7pbqLjHixlXfcIgDfAdcg37yoMtX8G5flAH15Tknnb07IF995z8+F1y1Q== Received: from VI1PR09MB4239.eurprd09.prod.outlook.com (2603:10a6:800:12f::23) by DBBPR09MB3029.eurprd09.prod.outlook.com (2603:10a6:10:f0::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5164.20; Fri, 15 Apr 2022 16:44:03 +0000 Received: from VI1PR09MB4239.eurprd09.prod.outlook.com ([fe80::dcb2:a4a2:335a:98ec]) by VI1PR09MB4239.eurprd09.prod.outlook.com ([fe80::dcb2:a4a2:335a:98ec%3]) with mapi id 15.20.5164.020; Fri, 15 Apr 2022 16:44:03 +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: Fri, 15 Apr 2022 18:43:35 +0200 Message-ID: X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220415164335.24808-1-isak.westin@hotmail.com> References: <20220415164335.24808-1-isak.westin@hotmail.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-TMN: [GKRZWpYf7D8LxUh1BkKQ51NYWC5OD2eM] X-ClientProxiedBy: ZR0P278CA0135.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:40::14) To VI1PR09MB4239.eurprd09.prod.outlook.com (2603:10a6:800:12f::23) X-Microsoft-Original-Message-ID: <20220415164335.24808-2-isak.westin@hotmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2f6a953f-18ab-4b1a-0dd2-08da1eff2624 X-MS-Exchange-SLBlob-MailProps: +LiGfBxqLEsiTQR6L2uA9gg60dIKieXwQ2CO+dSPIjhQim+Tk143QYFuLIBrDGJrKFaHtu2br+kO4Mhwf6vf5P4yUz/MLMm4AnBcDR4weOVI46+1FJEfOAG+w6JcnBer8X2YwEds5LripEvA0Szr9lyFbjqk/9NYEMOo6kj3nyTrKyXejifiiAF5To2xOz5LhpoX0MAVaV3yWzEkoeyTCU3jaVxrQdMwgMBXxK7t6eS4IzZlIJlGQGSpyjEMK5utG0xdB+CvrwgnQRNq7qsyWtJ6gVXdHVaF7CqPKydeLkfi4d1IVWnKBDlPi0Qqf2KZDYrWDmqzQ+6b5O7YtODSEOCzxhxPGwAPzSfSDsrtHU53mJGNV8EeGst7YXtCYdC4aDi62+nwx8q59c45vOdLedP+ARn3Qhj51wvCMFlkeeCl6TipTI6DhSzH7UNhLhuRY9+4ZZpJ2NaTYTjl4z0COgr7qP3370NtymozqvGqKjHgg4Cj02mHmAic4VY8yR3YasmgOwbJNqzrmPanFytw+psnJhtw+qU2dAA04jfjJlkgo3ANiwZygOnPcVJXdfpAGl2De27shzDN4w30uANONQGnOgVRLDfPeUbZdcyLob62I5OhzDCMv2yprrUySw7ARwteZpD1XauyEGgAg+cuGjnt4XzqPXjBOABAY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QM2tn3QahGXV0cHY0/J4xm9u17StHY8BSVvkxsz?= =?us-ascii?Q?XNDqsOlBelmUPedQwSh2lf4h31L5vDvqOQ+6oAC09YVEisVT9vPO21MJgxcA?= =?us-ascii?Q?RH4ffLCOBC0nms+U1Hpgtbh/P9gtauo07ipf/Idr0qJhfWsu6F1OnDfygcvN?= =?us-ascii?Q?wtuEfH0oZ5yBESpczakZWAcGwUleHu3PA6ffyxHhXuuJ3jJnptBFsb9MxVtP?= =?us-ascii?Q?POr322j/KIw6/WOI9Pt2JYtjj8o2v95d+rLybwOCa9Iu94qn6H93wJGae4nd?= =?us-ascii?Q?uxpVLUFUu7FEEEOCBEPq+pIy5SzGj+GU+d4O3uIHplcnaeD0yk3Togk3/uBr?= =?us-ascii?Q?UuQzxAaNl2BXFNfYVnUe4YojbLYaktCnAaKjLvubSaNlW2x88GLyl1IIA9kj?= =?us-ascii?Q?q6T1hLqBAELZ9+g7/dfdB6LWTFIBNG73?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-64da6.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 2f6a953f-18ab-4b1a-0dd2-08da1eff2624 X-MS-Exchange-CrossTenant-AuthSource: VI1PR09MB4239.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2022 16:44:03.3612 (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: DBBPR09MB3029 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FORGED_HOTMAIL_RCVD2, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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