Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1149061ybl; Fri, 24 Jan 2020 16:44:29 -0800 (PST) X-Google-Smtp-Source: APXvYqwKYNGBdLW7BxDiIz2w2pLvEPuV+eLsG/HeMNYsUBWx/2triBkV4C8CV8jc2rrpvJX9Qyhl X-Received: by 2002:aca:c30d:: with SMTP id t13mr1070363oif.166.1579913069796; Fri, 24 Jan 2020 16:44:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579913069; cv=none; d=google.com; s=arc-20160816; b=xi/mgPNSxeOGtl65NgZFH858uMlJNhotP9cga65a7ZfXcyQswMzmG5X9z5TPVUeirZ dxgaqCUP84CP1mhKZsINrO3UgEYKIXK7jZZULz4G8lIAy9qvuD6FlaLEwDBK0kCYHKuA bH+vNBOtUFOTNBElaZy48QxQaF3wjp1Pno9MDNmIqlzDsEZ2VhecXoTToA6PGTlWm1DK 4KG09mej/tt1bNFIQnfBiq6nr5AA/851zKO6tUit3m478qbNdP4w7NF25NWgI/fzbqrs KeO41RQSO4+UYKG9DQ35mnRwBnj8iKRIkYctQetYAY0JVLNyU7pGOZZpFiTaA0aURnee 3rsw== 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=xotfHzniUqvF4BVmeovNnhAR7uL2WlsGiDa9UpI+RDo=; b=N44vlFXaFWqaTYK+pSkpDkwnZiD0dFmFd8rXE+mP0oOFVWU+7hkLHT6T/OJ7V6EYAC fjekyJiBLajJIXB/gvZrnOQ68bzpmXWkA+beyKqKTikn49mcX2TKMxL8gEy0OSki2FZ2 WH/qd5CI5nBMXZObzS2yAi/R9Sm5J8UMXqg/3xr71isDHaxCiIP0DTttcIuuaL3uoaN8 h3qZTlwAlVQBYfjYsrrhmbwsHHbSxwOdFKqh84pNM5x6bntJ4Rgq6p0dHSSX8VoXHieM 4OW3lMmQDNg6zVbyLdCzyJiRd77EcvnsPzMswIyTfw8msZVX1mtAQQY2w0e9auUMW1pO wGQw== 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 f9si3703570otp.111.2020.01.24.16.44.02; Fri, 24 Jan 2020 16:44:29 -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 S2387560AbgAYAn7 (ORCPT + 99 others); Fri, 24 Jan 2020 19:43:59 -0500 Received: from mga01.intel.com ([192.55.52.88]:55763 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387542AbgAYAn7 (ORCPT ); Fri, 24 Jan 2020 19:43:59 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jan 2020 16:43:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,359,1574150400"; d="scan'208";a="245864373" Received: from bgi1-mobl2.amr.corp.intel.com ([10.251.17.203]) by orsmga002.jf.intel.com with ESMTP; 24 Jan 2020 16:43:58 -0800 From: Brian Gix To: linux-bluetooth@vger.kernel.org Cc: brian.gix@intel.com, inga.stotland@intel.com Subject: [PATCH BlueZ v2 0/5] mesh: Add NVM storage of Replay Protection List Date: Fri, 24 Jan 2020 16:43:45 -0800 Message-Id: <20200125004350.4640-1-brian.gix@intel.com> X-Mailer: git-send-email 2.21.1 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 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: Remove unneeded Sequence Number increment 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 | 112 ++++++++++++++-- mesh/net.h | 3 + mesh/rpl.c | 277 ++++++++++++++++++++++++++++++++++++++++ mesh/rpl.h | 30 +++++ mesh/util.c | 25 ++++ mesh/util.h | 1 + 11 files changed, 447 insertions(+), 143 deletions(-) create mode 100644 mesh/rpl.c create mode 100644 mesh/rpl.h -- 2.21.1