Skip to content

Commit

Permalink
nimble/gap: Fix for resolving list peer removal
Browse files Browse the repository at this point in the history
This commmit aims to fix an issue where deleting
peer from resolving list would fail due to
lack of IRK on the list.
  • Loading branch information
szymon-czapracki authored and sc committed Feb 19, 2024
1 parent 60aab30 commit c203af7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion nimble/host/src/ble_gap.c
Original file line number Diff line number Diff line change
Expand Up @@ -6202,7 +6202,12 @@ ble_gap_unpair(const ble_addr_t *peer_addr)

rc = ble_hs_pvcy_remove_entry(peer_addr->type,
peer_addr->val);
if (rc != 0) {

/* We allow BLE_ERR_UNK_CONN_ID as the IRK of the peer might not be
* present on the resolving list, but we still should be able to
* remove that entry.
*/
if (rc != 0 && rc != (BLE_HS_ERR_HCI_BASE + BLE_ERR_UNK_CONN_ID)) {
return rc;
}

Expand Down

0 comments on commit c203af7

Please sign in to comment.