Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1939823rwb; Thu, 29 Sep 2022 04:20:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7i5kaqTvtOBJQ/cJ3CjlWQdta5c2UE/CUR9VWxWUKaISAOs9K93/NBzlJzs35CRaW8ox4T X-Received: by 2002:a17:907:724a:b0:782:405f:8115 with SMTP id ds10-20020a170907724a00b00782405f8115mr2305447ejc.147.1664450410700; Thu, 29 Sep 2022 04:20:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664450410; cv=none; d=google.com; s=arc-20160816; b=b3WaYX6x13UbwH6dwizFhIA0QSgUt14qB8SiqI3lenK5DdmQqG4mlsknFFKAjjenpQ /wV/lDoqM7YNJRcr4rLCUhatp9w2p8K/7aW2nEsxTBLe8WC0lLKXxJCtPNFVOH3+x7Ub GCa36fuqGj2N4F18dsPAMKr7J9bg4CW64ZlnckSn+zHyLnSt7pWUnilxhD14gaLaGEC1 hFEI9dIO37I2/j9otIP1NWJLtpLjFebiHflTJ8/6Slk+hmT5MFD6IE5nkXZRJOoI/Z1C 5EX6aoIbBBt1I2ztsYbTHKeke3KsA6paeOoiRvwD5JbxSJKF062fPOfjHCDvw7EtylSV cq9A== 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=prMlpJimqoy2ZOJ0Scxwmj3yIYLS8cMMrVVPANfOO+I=; b=ZG47kF5oqz7FqNxtP1eJRU+N8IKcPJ+xFcn2fDNgBkXK2Z/4ATPJ5clOvCf38/C3S/ GYaNoov48nBWJ+v5WWNw5wgJ5qzEcvDe6ZotNjOZZxZzMXcySDocYWwb+aw26s+H5pST HM+UYSXqxBrQEIxFayrw18d+vDcaFjF4gYHoNLvqKmuZ4/oSKUO7KSiclFU7zQ5oS1ud HLXz8aY1pjcJkbnwFPZMSrNKkUAM9cc4+kJCSAiAyrfiQ3qdcmljhhEVdZMLE0L5G5q4 CsNH6RsVv6i+rIbMY31sWy3RWyvUQoQ9v7XiDwiC2vU4x7F2JABsw/3ThKHenhWOtLIm 2fzQ== 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 go36-20020a1709070da400b00781bf46536bsi3360596ejc.4.2022.09.29.04.19.45; Thu, 29 Sep 2022 04:20:10 -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 S235198AbiI2LES (ORCPT + 99 others); Thu, 29 Sep 2022 07:04:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234729AbiI2LEP (ORCPT ); Thu, 29 Sep 2022 07:04:15 -0400 Received: from voyager.loytec.com (voyager.loytec.com [88.198.4.4]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37F2C1EC58 for ; Thu, 29 Sep 2022 04:04:13 -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 1odrKu-0007Jp-9Q for linux-bluetooth@vger.kernel.org; Thu, 29 Sep 2022 13:04:12 +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 28TB45CI3109252; Thu, 29 Sep 2022 13:04:10 +0200 From: Isak Westin To: linux-bluetooth@vger.kernel.org Cc: Isak Westin Subject: [PATCH BlueZ 4/4] mesh: Allow Key Refresh Phase 0 to 3 transition Date: Thu, 29 Sep 2022 13:03:44 +0200 Message-Id: <20220929110344.26130-5-isak.westin@loytec.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220929110344.26130-1-isak.westin@loytec.com> References: <20220929110344.26130-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 Transition to Phase 3 from Phase 0 does not cause any state change, but is a valid transition. See MshPRFv1.0.1 section 4.2.14. --- mesh/cfgmod-server.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mesh/cfgmod-server.c b/mesh/cfgmod-server.c index 7044b670d..be90ef8c5 100644 --- a/mesh/cfgmod-server.c +++ b/mesh/cfgmod-server.c @@ -436,6 +436,10 @@ static uint16_t cfg_key_refresh_phase(struct mesh_node *node, return 0; } + if (pkt[2] == KEY_REFRESH_TRANS_THREE && + phase == KEY_REFRESH_PHASE_NONE) + goto done; + status = mesh_net_key_refresh_phase_set(net, idx, pkt[2]); l_debug("Set KR Phase: net=%3.3x transition=%d", idx, pkt[2]); -- 2.20.1