Skip to content

Commit ab6af6e

Browse files
akredalenrlubos
authored andcommitted
bluetooth: mesh: clear bonds for all ids on node reset
Fixed an issue where Node Reset only cleared bonds for the default identity, leaving SMP and other service bonds intact. Now clears bonds for all Bluetooth identities to ensure complete reset. Signed-off-by: Stine Åkredalen <[email protected]>
1 parent dcffa2d commit ab6af6e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

subsys/bluetooth/mesh/vnd/le_pair_resp.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,11 @@ static void bt_mesh_le_pair_resp_reset(const struct bt_mesh_model *model)
9797

9898
bt_mesh_le_pair_resp_passkey_invalidate();
9999

100-
/* Clear all bonding information when receiving node reset */
101-
err = bt_unpair(BT_ID_DEFAULT, NULL);
102-
if (err) {
103-
LOG_ERR("Unpair err: %d", err);
100+
for (uint8_t id = 0; id < CONFIG_BT_ID_MAX; id++) {
101+
err = bt_unpair(id, NULL);
102+
if (err) {
103+
LOG_ERR("Unpair ID %u err: %d", id, err);
104+
}
104105
}
105106
}
106107

0 commit comments

Comments
 (0)