Hi,
Here are two more pathes to fix compliance with the mesh profile and to
pass following PTS tests:
- MESH/NODE/CFG/SL/*
- MESH/NODE/CFG/AKL/*
Happy for any feedback.
Best regards,
Isak
Isak Westin (2):
mesh: Clear addr field if virt sub failed
mesh: Reply error if appkey added for wrong netkey
mesh/appkey.c | 4 +++-
mesh/cfgmod-server.c | 4 ++++
2 files changed, 7 insertions(+), 1 deletion(-)
--
2.20.1
If a known appkey is added for a different netkey, the status reply
should be Invalid NetKey.
---
mesh/appkey.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mesh/appkey.c b/mesh/appkey.c
index 52fed8c31..f31d81942 100644
--- a/mesh/appkey.c
+++ b/mesh/appkey.c
@@ -296,7 +296,9 @@ int appkey_key_add(struct mesh_net *net, uint16_t net_idx, uint16_t app_idx,
key = l_queue_find(app_keys, match_key_index, L_UINT_TO_PTR(app_idx));
if (key) {
- if (memcmp(new_key, key->key, 16) == 0)
+ if (key->net_idx != net_idx)
+ return MESH_STATUS_INVALID_NETKEY;
+ else if (memcmp(new_key, key->key, 16) == 0)
return MESH_STATUS_SUCCESS;
else
return MESH_STATUS_IDX_ALREADY_STORED;
--
2.20.1
Hello:
This series was applied to bluetooth/bluez.git (master)
by Brian Gix <[email protected]>:
On Fri, 23 Sep 2022 13:31:47 +0200 you wrote:
> Hi,
>
> Here are two more pathes to fix compliance with the mesh profile and to
> pass following PTS tests:
> - MESH/NODE/CFG/SL/*
> - MESH/NODE/CFG/AKL/*
>
> [...]
Here is the summary with links:
- [BlueZ,1/2] mesh: Clear addr field if virt sub failed
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=32d866b4df92
- [BlueZ,2/2] mesh: Reply error if appkey added for wrong netkey
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=95d9dc6764fc
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html