From ab9bd0ed418541a0fb339dd8b378f14a76b709e4 Mon Sep 17 00:00:00 2001 From: Nagaraj D R Date: Tue, 3 Dec 2019 15:23:27 +0530 Subject: [PATCH] mesh: Fix invalid netkey index in appkey add/delete 8 LSbs of netkey index should be packed into the first octet Change-Id: Ia2226334e4ef9702e44a9fa96a28e8273780ac04 Signed-off-by: Anupam Roy --- tools/mesh-gatt/config-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/mesh-gatt/config-client.c b/tools/mesh-gatt/config-client.c index 5e6374f..ed31c67 100644 --- a/tools/mesh-gatt/config-client.c +++ b/tools/mesh-gatt/config-client.c @@ -591,7 +591,7 @@ static void cmd_app_key(int argc, char *argv[], uint32_t opcode) return bt_shell_noninteractive_quit(EXIT_FAILURE); } - msg[n++] = net_idx & 0xf; + msg[n++] = net_idx & 0xff; msg[n++] = ((net_idx >> 8) & 0xf) | ((app_idx << 4) & 0xf0); msg[n++] = app_idx >> 4; -- 2.7.4