Skip to contentSkip to conversation

mesh: Fix invalid netkey index in appkey add/delete

PATCH Applied Nagaraj D R 2 participants 2 messages Dec 3, 2019 1 message not in the archive Bluetooth drivers

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CGME20191203095335epcas5p2f42315a8d7d9a081afa929f96bb66356@epcas5p2.samsung.com

#1 lore raw

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

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(-)
tools/mesh-gatt/config-client.c +1 -1
index 5e6374f..ed31c67 100644
@@ -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;
Signature · 1 line
2.7.4
Applied
#2 lore raw

Applied

Quoted 18 lines · Nagaraj D R

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(-)
tools/mesh-gatt/config-client.c +1 -1
index 5e6374f..ed31c67 100644
@@ -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;