Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp45629ybi; Tue, 16 Jul 2019 15:57:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqxgcBpz0OetzJNOKFbm8UO3Xvik5V8ePoJphGaWef7ROW3NGKrKSv6DBbMyWU/vEz4oIFB/ X-Received: by 2002:a17:902:934a:: with SMTP id g10mr39558026plp.18.1563317857524; Tue, 16 Jul 2019 15:57:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563317857; cv=none; d=google.com; s=arc-20160816; b=Knsgs2zxj4Ck8N90yxeSgX8SpJCLGewFR9o1gpVvGTasGA/5ptXF2UHhqLedWbFw+G Zk1X8/v0IOfEjgiblj1g8BhgUZfAXaW7YHWiUjHeVGO2bLwOPIBF1HQtu1FpLYAsHbXs m/3sJOxtPG73g5+6iWs6PI4vQoLCf3GV2i3SHvG0f/5x4H8a/QCvhWVZrxNbZorgugx4 Xf2HrQ17TKB7p2ddFhZYMS3L0H0rbjAbwLcQNZu9yPGwjBbsEWU/motzI+NwECNRf6bg 1v0x4Jxiwo/Z2o/6cqi1XuMI7ek0nm28K+JzpsRv3/b+UVmRzUBPBy9lDoANcXPJyaFM Er5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=6gVU1i8INqRAW/16WgrW2beNVfJK1QpjUgssuPwoNJ4=; b=XWEuYfnBKkM4dbuNrTAIHj7XlAd/9pdsIx4gT+fQH0io3hdgsMVp0zRJuosf+dBBEF B3toJA/MVzLzWsWu6zD7pC/QfmxouMRnD4HVWtWMity5XoZvFaOHDfuagdbIQWJxeFnH J7Co5Mhu7EJAGAu7x8HOUp+LAvryvYr/C1Tk++0qVCy5PZKB+j535r6fJiDOMq4zhTfm RP1BHj8UkESMMZovhXcr2ZX0xjhQga7rP1GnudJ7hGxzPF5Ld7qb5BTt5vcDXOMwG6XA Mh3hM6HwiuZBHnlJNf9oQNqLCH52Rfpl32OzPigjcj9wCo0w4tSg6BVmFD9joGyeglky sBjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o12si21693302pgl.448.2019.07.16.15.57.02; Tue, 16 Jul 2019 15:57:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388078AbfGPW4u (ORCPT + 99 others); Tue, 16 Jul 2019 18:56:50 -0400 Received: from mga02.intel.com ([134.134.136.20]:2095 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728414AbfGPW4u (ORCPT ); Tue, 16 Jul 2019 18:56:50 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Jul 2019 15:56:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,271,1559545200"; d="scan'208";a="170073266" Received: from bgix-dell-lap.sea.intel.com ([10.251.137.82]) by orsmga003.jf.intel.com with ESMTP; 16 Jul 2019 15:56:49 -0700 From: Brian Gix To: linux-bluetooth@vger.kernel.org Cc: inga.stotland@intel.com, brian.gix@intel.com, michal.lowas-rzechonek@silvair.com Subject: [PATCH BlueZ 0/3] mesh: Propagate/Preserve Net Index for Access Layer Date: Tue, 16 Jul 2019 15:56:41 -0700 Message-Id: <20190716225644.11449-1-brian.gix@intel.com> X-Mailer: git-send-email 2.14.5 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Two major flaws are corrected by this patch-set: 1. The Spec defined Access Layer AID was being confused with the internally used key_id which is used to identify Network keys for multiple networks, sub-networks, and friendships. This confused ID was then being used instead of the correct Network Key ID for outgoing messages. 2. The specification requires *responses* to all standard Server messages to be sent with the same credentials as the received command that triggered them. This requires more complete propagation of the Net Index value on received messages, so that the same Network key is used in the reverse direction. This additionally now uses the requested Net Index when sending Device Key secured messages through the D-Bus interface. Brian Gix (3): mesh: Add bound Net Index lookup for App Keys mesh: Normalize Access Key AID naming convention mesh: Propagate Net Index up Rx message chain mesh/appkey.c | 59 +++++++++++++------- mesh/appkey.h | 1 + mesh/cfgmod-server.c | 154 ++++++++++++++++++++++++++++----------------------- mesh/crypto.c | 37 ++++++------- mesh/crypto.h | 8 +-- mesh/model.c | 129 +++++++++++++++++++++--------------------- mesh/model.h | 10 ++-- mesh/net.c | 92 +++++++++++++++++------------- mesh/net.h | 10 ++-- mesh/node.c | 10 ++-- 10 files changed, 276 insertions(+), 234 deletions(-) -- 2.14.5