This is an automated email from the ASF dual-hosted git repository.
janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
The following commit(s) were added to refs/heads/master by this push:
new 620064e69 nimble/gap: Fix for resolving list peer removal
620064e69 is described below
commit 620064e69d47c01be8b31765de8184eed31a86ce
Author: Szymon Czapracki <[email protected]>
AuthorDate: Tue Jan 16 11:02:36 2024 +0100
nimble/gap: Fix for resolving list peer removal
This commit aims to fix an issue where deleting
peer from resolving list would fail due to
lack of IRK on the list.
---
nimble/host/src/ble_gap.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/nimble/host/src/ble_gap.c b/nimble/host/src/ble_gap.c
index 85d7a9e4c..8c63610c6 100644
--- a/nimble/host/src/ble_gap.c
+++ b/nimble/host/src/ble_gap.c
@@ -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;
}