From 17caa1929d6eca25326655f92b91bcf717d92587 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Mon, 5 Nov 2018 11:48:16 +0100 Subject: [PATCH] mesh: store netkey_index in mesh_network_pdu for received packets --- src/ble/mesh/mesh_network.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ble/mesh/mesh_network.c b/src/ble/mesh/mesh_network.c index 91cde966e..22ee50f3e 100644 --- a/src/ble/mesh/mesh_network.c +++ b/src/ble/mesh/mesh_network.c @@ -48,7 +48,9 @@ #include "provisioning_device.h" #include "btstack.h" +// configuration #define MESH_NETWORK_CACHE_SIZE 100 +#define ENABLE_MESH_RELAY // structs @@ -347,6 +349,8 @@ static void process_network_pdu_validate_d(void * arg){ if (!valid){ btstack_memory_mesh_network_pdu_free(network_pdu); } else { + // set netkey_index + network_pdu->netkey_index = current_network_key->netkey_index // store in network cache uint32_t hash = mesh_network_cache_hash(network_pdu); mesh_network_cache_add(hash);