From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92153C33C9E for ; Wed, 29 Jan 2020 02:33:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 65491207FF for ; Wed, 29 Jan 2020 02:33:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726546AbgA2CdF (ORCPT ); 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