From 7c379f8a653f4a6fb155272c8dfd603776bceed3 Mon Sep 17 00:00:00 2001 From: lly Date: Wed, 18 Mar 2020 15:54:03 +0800 Subject: [PATCH] ble_mesh: Associate replay protection list size with nodes count The replay protection list of Provisioner should be at least equal to the number of nodes with the precondition that each node contains only one element. The help information of replay protection list is updated, and the maximum number of nodes for Provisioner is adjusted based on the replay protection list size. --- components/bt/esp_ble_mesh/Kconfig.in | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/components/bt/esp_ble_mesh/Kconfig.in b/components/bt/esp_ble_mesh/Kconfig.in index 746b4c78d5..f9e045a76f 100644 --- a/components/bt/esp_ble_mesh/Kconfig.in +++ b/components/bt/esp_ble_mesh/Kconfig.in @@ -56,7 +56,7 @@ if BLE_MESH config BLE_MESH_WAIT_FOR_PROV_MAX_DEV_NUM int "Maximum number of unprovisioned devices that can be added to device queue" - default 20 + default 10 range 1 100 help This option specifies how many unprovisioned devices can be added to device @@ -66,7 +66,7 @@ if BLE_MESH config BLE_MESH_MAX_STORED_NODES int "Maximum number of nodes whose information can be stored" - default 20 + default 10 range BLE_MESH_MAX_PROV_NODES 1000 help This option specifies the maximum number of nodes whose information can be @@ -77,7 +77,7 @@ if BLE_MESH config BLE_MESH_MAX_PROV_NODES int "Maximum number of devices that can be provisioned by Provisioner" - default 20 + default 10 range 1 1000 help This option specifies how many devices can be provisioned by a Provisioner. @@ -348,6 +348,11 @@ if BLE_MESH The replay protection list is used to prevent a node from replay attack, which will store the source address and sequence number of the received mesh messages. + For Provisioner, the replay protection list size should not be smaller than + the maximum number of nodes whose information can be stored. And the element + number of each node should also be taken into consideration. For example, if + Provisioner can provision up to 20 nodes and each node contains two elements, + then the replay protection list size of Provisioner should be at least 40. config BLE_MESH_MSG_CACHE_SIZE int "Network message cache size"