Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp61340ybl; Tue, 28 Jan 2020 18:33:33 -0800 (PST) X-Google-Smtp-Source: APXvYqy4vrrEGEsVSFYLNwT+E3LwsRUOEMJVeXxln7lxiKYAatQ/MJjjgjFslwHQ6OA9up6OvDDm X-Received: by 2002:a05:6830:13da:: with SMTP id e26mr17845744otq.97.1580265213445; Tue, 28 Jan 2020 18:33:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580265213; cv=none; d=google.com; s=arc-20160816; b=vQphMphsv5p6QpcIK6Flua6UxZ+aVGQMKE/Qog/KtxG72t9QdnvZVMLsn8z80wpJ6w ARGxnygrZETodYyPUq7BOelQmqYUVpHptj3lHBhdjM+poRqP5Z7pSq9sCw73Up5e81Cm WzzDKdE1L8KUUxzvRcME9YEQAIQsGXh5y80uLlRnCaSFOVUOIKlKknESp6jjOKri+N29 Hg+sfmNT8aLcLCXE7mUlILgfqe21JQfQldpHANVFzerreVh3XdpAv3tb4c1DnLSuJH3W gF94dIz1Wz3C/pStNIqfkELwt5+vmgqUdJ4UsktUnRKQYx26UjeekOdKJkB7yqNT1wBy kKNQ== 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; bh=/sIf7ZBLiYF7H550J1TYYIlj+P/xln7vlkWePah/utA=; b=bjPeh7wje9tw2urD3GrBWsemKh7hjNhx9tJORwNiAN0u3YA1ybFzPPJDkkkiptOMyS s4s2JMIkStjvy1ikwPHRRQ1/uESgq2cTA1FsffQJuRygXVO0VgxR0uCAX0eNe+zPY3lP VTkpxOCla4a+LtPdq+CPQdQbbOB6t0AgJuo270HQf9wmbLZwkFDrtov6xJUe7VzpqpD1 EDBx6wonKMI2XmVwc3QDW3md3F3zstvznR7m80QCxlYst71cY5L9rudktMmp2ECmy/WX 7WXWbrj2UCyACb1z7XSzaSwpDqvc+nJJV5lzK+95zi2OhspaFMelpS3JSuOY26xayQ7B uuYQ== 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 j18si369680otq.275.2020.01.28.18.33.07; Tue, 28 Jan 2020 18:33:33 -0800 (PST) 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 S1726540AbgA2CdF (ORCPT + 99 others); Tue, 28 Jan 2020 21:33:05 -0500 Received: from mga17.intel.com ([192.55.52.151]:30758 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726539AbgA2CdE (ORCPT ); Tue, 28 Jan 2020 21:33:04 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Jan 2020 18:33:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,376,1574150400"; d="scan'208";a="427831861" Received: from bgi1-mobl2.amr.corp.intel.com ([10.255.84.27]) by fmsmga005.fm.intel.com with ESMTP; 28 Jan 2020 18:33:03 -0800 From: Brian Gix To: linux-bluetooth@vger.kernel.org Cc: brian.gix@intel.com, inga.stotland@intel.com, rafal.gajda@silvair.com Subject: [PATCH BlueZ v4 0/5] mesh: Add NVM storage of Replay Protection List Date: Tue, 28 Jan 2020 18:32:53 -0800 Message-Id: <20200129023258.10004-1-brian.gix@intel.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Version 4: Style guide fixes from Inga (patch 5/5). Version 3: Fix problem found by RafaƂ relating to the handling of sequence numbers of messages being handled internally (loop-backs), which were being rejected by the Replay Protection List (please see patch 3/5). Version 2: Fix path construction code when first reading RPL from NVM An oversight led to losing our Replay Protection List with every re-boot. This patch-set makes a number of Replay Protect List modifications that culminate in adding rpl.c/h, which stores the latest iv_index/sequence values for each node that handles an incoming packet. The first 4 patches, does some maintenance required to handle RPL according the the Mesh Specification. Brian Gix (5): mesh: Relocate tree deletion to util.c/h mesh: Move Replay Protection to mesh/net.c mesh: Clean-up unneeded Sequence Number increments mesh: Apply Replay Protection to all incoming packets mesh: Add NVM storage of Replay Protection Makefile.mesh | 1 + mesh/appkey.c | 102 --------------- mesh/appkey.h | 3 - mesh/mesh-config-json.c | 20 +-- mesh/model.c | 16 +-- mesh/net.c | 128 +++++++++++++++--- mesh/net.h | 3 + mesh/rpl.c | 278 ++++++++++++++++++++++++++++++++++++++++ mesh/rpl.h | 30 +++++ mesh/util.c | 25 ++++ mesh/util.h | 1 + 11 files changed, 457 insertions(+), 150 deletions(-) create mode 100644 mesh/rpl.c create mode 100644 mesh/rpl.h -- 2.21.1