Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp12831194pxu; Sat, 2 Jan 2021 13:11:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJxL2IMieBq/YCQdhHjCvr/Q+ImT0NDHxxPp8zYOSZ5TyLIl4+tETZf5DE4DfAxxvtCGNiNj X-Received: by 2002:a17:906:fa88:: with SMTP id lt8mr61705533ejb.408.1609621870095; Sat, 02 Jan 2021 13:11:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609621870; cv=none; d=google.com; s=arc-20160816; b=o39VNPd4FVnGyi0v+maIvXQptKZwtwSDR7j//6fz1WJFE3PgM+370tpZ16P/jlHjO1 skfVw4qnDAfali+zhdYrPi7aLvUAvj10OLr83l/wVCvWHKeXNjFrbERMXW1+yHQxvW5z llWX7JR5gkSekR5PnDo0eE/9l43dfgXkvUZ9oB39fFv2zn9i2p9N5yPF8eZLTuvE/w1g Xz0TStq/jpxMDVHcT/zQMKSRgaDG3s9OwDqJuXh+7R31ioDmK5Ryrebhj5y2hhY8yHU5 3szk/0TfA/6XTiP2iD+uM3YR4kYbBICdc9buMEw6b9QWaFqzQwSkbKscVS0sIF6BYwPC Q3qA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:user-agent:date:message-id:subject:from:cc:to :dkim-signature; bh=K8q68xQQSXiYwsSP43gMggwENj8BGJGBq82V1Izl4DU=; b=GYltVjEwf2F5LkaLp62VBBlIm+Lyj62fXEQ9pL+4TDZ/CgE75GPb1g4foRo/xx4BWR W0kyR4QLQvxOHyu1tRxOABEbFAHvzbexyKncLCYzTfEKntib8zbMhnRtDt4xk7DHMb1R vACxQRMJUd6lOHU8B6dY8jUFJM+I+8Gxjw5USDQCI8JZdJlmAI/vg1weQHzLu5mrisEg vYuFxRvcpoDuxt0VLIEQomeFGV47iLWD4aqeWjHS5+5aR6fRSnrwrqhhVEWfBqxuxI9r Z9icP2/nMEKY0DWLo4NDzvEHhoEhpkreBBHlI7lvL+Py6N/MWdRgeS3Vfu0nAWs7qU7q 1KaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mnmoran.org header.s=dkim header.b="D7/HLt71"; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id el22si27598503ejc.362.2021.01.02.13.10.30; Sat, 02 Jan 2021 13:11:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mnmoran.org header.s=dkim header.b="D7/HLt71"; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726686AbhABVI4 (ORCPT + 99 others); Sat, 2 Jan 2021 16:08:56 -0500 Received: from hoster906.com ([192.252.156.27]:37672 "EHLO hoster906.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726667AbhABVI4 (ORCPT ); Sat, 2 Jan 2021 16:08:56 -0500 X-Greylist: delayed 401 seconds by postgrey-1.27 at vger.kernel.org; Sat, 02 Jan 2021 16:08:56 EST DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=mnmoran.org; h=to:cc :from:subject:message-id:date:mime-version:content-type :content-transfer-encoding; s=dkim; bh=K8q68xQQSXiYwsSP43gMggwEN j8BGJGBq82V1Izl4DU=; b=D7/HLt71fMNNNeoTSt/pU+u/QS7A/ZL5y26yEUZbA Idl91XWWxUuO/ixH7s3i8SVnpy6vvhVe8VF1oN+hjLs2Xa5VCwXrEuhuWGzlzkpr YXai/hYoFw/dMOR05wdSWbetmLlnwXmgbAbKo6oOOfDrmbiedSDsbmw6JIRddiKt ig= Received: (qmail 35826 invoked by uid 503); 2 Jan 2021 21:01:34 -0000 Received: from unknown (HELO ?192.168.254.79?) (mike@mnmoran.org@40.134.89.129) by hoster906.com with ESMTPA; 2 Jan 2021 21:01:34 -0000 To: "linux-bluetooth@vger.kernel.org" Cc: "Gix, Brian" , "Stotland, Inga" From: "Michael N. Moran" Subject: mesh: Key Refresh procedure does not finalize AppKeys Message-ID: <1a29717a-5c89-37d3-7fdb-dceeae33bee5@mnmoran.org> Date: Sat, 2 Jan 2021 16:01:33 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Greetings meshers, I am testing a BlueZ mesh configuration client that performs the Key Refresh procedure. Key Refresh works splendidly for NetKeys. Key Refresh also works well for AppKeys located on actual remote nodes. However, when updating the AppKeys for (what I will call) "virtual"[1] (those nodes that execute on the same host as the configuration client), the final transition back to Phase 0 doesn't take effect after returning to Phase 0 unless I restart bluetooth-meshd. Apparently, the persistence/data-base is updated correctly since the proper state is restored after a restart of the daemon. I suspect that somewhere in the path that begins in mesh/net.c with the function key_refresh_finish() there should be a place where the app_keys are iterated, updating the state of those AppKeys that belong to the subnet and have been updated. The update would involve copying the new_key to the "old" key field. I am using a relatively new version of BlueZ, and the lastest version of key_refresh_finish() looks unchanged. Am I missing something? Thanks, mike [1] I use the term "virtual" to avoid confusion with the term "local" that is used in the documentation to refer to something else that is not clearly defined to me.