Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1082673rwb; Thu, 6 Oct 2022 08:15:02 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5+zXJ33Oh6cHI07ZEV+DD9zetN1ZjG9JdQjOKJsnXsYWtLMv0H4EU5o0TxR9H1BALBfVw5 X-Received: by 2002:a05:6402:c7:b0:457:cd5d:d777 with SMTP id i7-20020a05640200c700b00457cd5dd777mr224771edu.245.1665069302338; Thu, 06 Oct 2022 08:15:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665069302; cv=none; d=google.com; s=arc-20160816; b=uFTZnT7lNxkeiIQ045qp4ttAYY0lgrtdwQ1T26KVX5MTJRHqluZPTKnhFiH03J0WTj yFUflXuEH/IAbAAhpHQTS12uHz+y7wKOGma4mya5XAU8ppZFEKvvxXiS6517m9zkNzPJ 4HekRX0IagaT4qpUM6rDMlfEo/Z/iZ1Kt1Ag3DvzJEbx+9dRWTGj2bgP6mn+JqbvAspC O8E9YEGXYPybTlW+GM7F12QGU3lzCOfYm3H8UTsomfvYnRYiIyTfVEcadvYXzUls1fax BwmpTXu4HWrkUmUlZSxxdpsMvPe+4UYY9QGnCtO8pZXfNcuL+Sht/yGtcIVDEjFoWwnp IBXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=cq0dH5gUHr2eGkwHVsJ6UdnQ3ZnYTbSGsMGjpKwc6/k=; b=LThqfLr6iXXRfKPOKmbWc7j4yZM34fy0+OuURi+2I47RwUvNvFJRP2jktM4EpDqJhD p8ciS4SiUBYbjH89xT8fX2qsiq1Ma800olGXlr9ME40efp312NbhrPXpEizIiF93SX86 Pj8A5OB8kk4rmbD5X2idhp+gEqa2Pc3LOUj6/yc8nw7fGXFXcfp/ouwlylKv5Kk4Zkox cQx1LeHNQcKaEG3Cg6Cl1bKoXDEh+xSAPqsM5Z2BTFz2sqVumxVav+Pkb78K3jP58VaF pUFJiE/zTCmnjPYpmtIZExRlwsUioHNL0Q5q7Oa1QZg3Qbb5W9yz7DOITg67X96ma7Dd 7nkg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qk34-20020a1709077fa200b0076daf135b26si17304259ejc.791.2022.10.06.08.14.36; Thu, 06 Oct 2022 08:15:02 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229496AbiJFPAJ (ORCPT + 99 others); Thu, 6 Oct 2022 11:00:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231809AbiJFO77 (ORCPT ); Thu, 6 Oct 2022 10:59:59 -0400 Received: from voyager.loytec.com (voyager.loytec.com [88.198.4.4]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C74BC1EADC for ; Thu, 6 Oct 2022 07:59:54 -0700 (PDT) Received: from 212-17-98-152.static.upcbusiness.at ([212.17.98.152] helo=lexx.office.loytec.com) by voyager.loytec.com with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ogSLo-0006rb-0t for linux-bluetooth@vger.kernel.org; Thu, 06 Oct 2022 16:59:52 +0200 Received: from loytec-dev-vm.delta.corp ([10.101.25.21]) by lexx.office.loytec.com (8.15.2/8.15.2/Some OS 1.2.3-4.5) with ESMTP id 296ExnRD4163430; Thu, 6 Oct 2022 16:59:49 +0200 From: Isak Westin To: linux-bluetooth@vger.kernel.org Cc: Isak Westin Subject: [PATCH BlueZ 1/6] mesh: Update Key Refresh flag after provision Date: Thu, 6 Oct 2022 16:59:22 +0200 Message-Id: <20221006145927.32731-2-isak.westin@loytec.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20221006145927.32731-1-isak.westin@loytec.com> References: <20221006145927.32731-1-isak.westin@loytec.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 212.17.98.152 X-SA-Exim-Mail-From: isak.westin@loytec.com X-SA-Exim-Scanned: No (on voyager.loytec.com); SAEximRunCond expanded to false X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE 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 The Key Refresh flag in the Secure Network beacon is now correctly updated based on provisioning data after being successfully provisioned. --- mesh/node.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mesh/node.c b/mesh/node.c index e81aa82fe..cf4ed140e 100644 --- a/mesh/node.c +++ b/mesh/node.c @@ -1270,8 +1270,8 @@ static bool add_local_node(struct mesh_node *node, uint16_t unicast, bool kr, MESH_STATUS_SUCCESS) return false; - if (!mesh_config_net_key_set_phase(node->cfg, net_key_idx, - KEY_REFRESH_PHASE_TWO)) + if (mesh_net_key_refresh_phase_set(node->net, net_key_idx, + KEY_REFRESH_PHASE_TWO) != MESH_STATUS_SUCCESS) return false; } -- 2.20.1