mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-08-22 17:59:58 +00:00
mesh: Fix handling of app index and local device key
Fix problem of not checking if the remote device key is actually our own. this is port of 0469bcdc43e4807ec1356fe2521a6fcd492ab6cb
This commit is contained in:
committed by
Łukasz Rymanowski
parent
74a57e51de
commit
d5e0507274
@@ -1763,7 +1763,9 @@ int bt_mesh_app_key_get(const struct bt_mesh_subnet *subnet, u16_t app_idx,
|
||||
{
|
||||
struct bt_mesh_app_key *app_key;
|
||||
|
||||
if (app_idx == BT_MESH_KEY_DEV_LOCAL) {
|
||||
if (app_idx == BT_MESH_KEY_DEV_LOCAL ||
|
||||
(app_idx == BT_MESH_KEY_DEV_REMOTE &&
|
||||
bt_mesh_elem_find(addr) != NULL)) {
|
||||
*aid = 0;
|
||||
*key = bt_mesh.dev_key;
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user