diff mbox series

[1/1] mesh: Handle netkey delete when netkey is not in netkeylist

Message ID 1585078044-14974-7-git-send-email-prathyusha.n@samsung.com
State New
Headers show
Series [1/1] mesh: Handle netkey delete when netkey is not in netkeylist | expand

Commit Message

Prathyusha Nelluri March 24, 2020, 7:27 p.m. UTC
From: Prathyusha N <prathyusha.n@samsung.com>

4.4.1.2.9 of Mesh Profile Bluetooth specification:
When an element receives a Config NetKey Delete message that
identifies a NetKey that is not in the NetKey List, it
responds with Success, because the result of deleting the
key that does not exist in the NetKey List will be the same
as if the key was deleted from the NetKey List.
---
 mesh/net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/mesh/net.c b/mesh/net.c
index ec05b6be9..3546b87d0 100644
--- a/mesh/net.c
+++ b/mesh/net.c
@@ -941,7 +941,7 @@  int mesh_net_del_key(struct mesh_net *net, uint16_t idx)
 	subnet = l_queue_find(net->subnets, match_key_index,
 							L_UINT_TO_PTR(idx));
 	if (!subnet)
-		return MESH_STATUS_CANNOT_REMOVE;
+		return MESH_STATUS_SUCCESS;
 
 	/* Delete associated app keys */
 	appkey_delete_bound_keys(net, idx);