Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp776694pxa; Wed, 19 Aug 2020 14:48:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrJ2zTsVmXltAVY94i2of7mdza45XU4wXCCYTCv/kC4wjtkr6804X4MgzizqLUorGpwONr X-Received: by 2002:a05:6402:3121:: with SMTP id dd1mr105266edb.72.1597873731401; Wed, 19 Aug 2020 14:48:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597873731; cv=none; d=google.com; s=arc-20160816; b=GLh+N9GUmmb81HaxRzkPt2viHsmUoCnykZivLP5SGXzYSx/UpqtUUNlfyASNUzEgdG Jf/N2QNRAL7TInw8mBuY2wFiU14IkKOva8fLJf+epu1FvKu1VY6cOp3wUmp9APKf9T/P +VW49M1qVl4i9Dz1TTwZNadF6lgwsUBJ25G5ZVSj8lHS2XNqqBoJCa+6hNM8J4ZglgJq nagBQBhTsDwFiZyU35ttL6LVqD6WQh6oEC/+wLcIdrrniu20icRAB4wFiNGNbHYRG4xl 95nbd0Cq466ZAI1kIt/zo0D/NZTQViqEUtlHDbjMna40Fr1ZsqfZBmDTf/kZptMAoVBl QZDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=x3qp6LOIIZF2DxIOYtPwCD/tPYHEsk2ev0PesjO4kQM=; b=0ChvLj9CkV+atsKny2j40sCVAlNfQGDaY3Yow0/ylIWxasfsWrr+QfzxV3mgCgxNC+ 0yXnBTgf/14wqIs/J+Ae4FRC6pRLQKggsltFS6ApzVQ8rKeJqLSi2sDhhtEnO3BTUJu+ xn4NivRNGXnFCwrPjtMbuBoYk7k5KMqc8pXItnKzBjCTWvscZioSefktAle5GPlMybCr WQrhx1FomfF98JsEOeoLKLBVfruHtj+egJyC4gEKsGoeQsScBDJ0ckSyy0trECMvuWna zzPF9a5rjD/DYFm04Bj6r7BhXYXC0HUyCH+t1wToijWWRZe585R6BTY0PbQBA8Kg/U0h LtAw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p26si130143edx.608.2020.08.19.14.48.09; Wed, 19 Aug 2020 14:48:51 -0700 (PDT) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726646AbgHSVsF (ORCPT + 99 others); Wed, 19 Aug 2020 17:48:05 -0400 Received: from mga18.intel.com ([134.134.136.126]:17684 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726466AbgHSVsF (ORCPT ); Wed, 19 Aug 2020 17:48:05 -0400 IronPort-SDR: Yr3GIvBu0vxLDTBkCfzlkjEBGmK/VB5tWfs306NrcmN9eSv8egQkifc1owEYALA/MtjLY/Bnf0 0H9GV3tA44OQ== X-IronPort-AV: E=McAfee;i="6000,8403,9718"; a="142834216" X-IronPort-AV: E=Sophos;i="5.76,332,1592895600"; d="scan'208";a="142834216" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2020 14:48:04 -0700 IronPort-SDR: gkIEOAl4gQv6ZJ5AuBXrudZDx7Cjt8NL5YXekRdcuOIh6uRg+K/aBw/+FtshatbtHSTBEx20bJ mZTom9o58ZBA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,332,1592895600"; d="scan'208";a="297357612" Received: from aupasani-mobl1.amr.corp.intel.com (HELO ingas-nuc1.intel.com) ([10.254.81.12]) by orsmga006.jf.intel.com with ESMTP; 19 Aug 2020 14:48:03 -0700 From: Inga Stotland To: linux-bluetooth@vger.kernel.org Cc: brian.gix@intel.com, Inga Stotland Subject: [PATCH BlueZ] mesh: Send correct NetKey index in DevKeyMessageReceived Date: Wed, 19 Aug 2020 14:48:02 -0700 Message-Id: <20200819214802.83756-1-inga.stotland@intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org The value of net_index in DevKeyMessageReceived() method must be set to the value of a subnet index on which a device key encoded message has been received. Was hard coded to 0. Fixed. --- mesh/model.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mesh/model.c b/mesh/model.c index b44e2f669..9529dfb2e 100644 --- a/mesh/model.c +++ b/mesh/model.c @@ -965,7 +965,8 @@ bool mesh_model_rx(struct mesh_node *node, bool szmict, uint32_t seq0, else if (decrypt_idx == APP_IDX_DEV_REMOTE || decrypt_idx == APP_IDX_DEV_LOCAL) send_dev_key_msg_rcvd(node, i, src, decrypt_idx, - 0, forward.size, forward.data); + net_idx, forward.size, + forward.data); } /* -- 2.26.2