[PATCH 1/1] mesh: Fix invalid netkey index in appkey add/delete

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



8 LSbs of netkey index should be packed into the first octet
---
 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




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux