From d0d5f831a5a4afc66e5efda51b5f9b821318558a Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Tue, 2 Jul 2019 17:13:26 +0200 Subject: [PATCH] mesh: update subnet on network key update and delete --- test/mesh/mesh_configuration_server.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/mesh/mesh_configuration_server.c b/test/mesh/mesh_configuration_server.c index 6640684e2..e273e647f 100644 --- a/test/mesh/mesh_configuration_server.c +++ b/test/mesh/mesh_configuration_server.c @@ -922,6 +922,7 @@ static void config_netkey_delete_handler(mesh_model_t * mesh_model, mesh_pdu_t * // remove netkey mesh_network_key_remove(network_key); + // remove all appkeys for this netkey mesh_transport_key_iterator_t it; mesh_transport_key_iterator_init(&it, netkey_index); @@ -929,6 +930,10 @@ static void config_netkey_delete_handler(mesh_model_t * mesh_model, mesh_pdu_t * mesh_transport_key_t * transport_key = mesh_transport_key_iterator_get_next(&it); mesh_configuration_server_delete_appkey(transport_key); } + + // update subnet + mesh_subnet_update_for_netkey_index(netkey_index); + } else { // we cannot remove the last network key status = MESH_FOUNDATION_STATUS_CANNOT_REMOVE;