hci: reset link key stored in connection

This commit is contained in:
Matthias Ringwald 2025-02-11 18:03:46 +01:00
parent cf25bba7d8
commit ce7e62b448
2 changed files with 3 additions and 1 deletions

View File

@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
--- ---
## Unreleased ## Unreleased
### Added ### Added
- GAP: simulate HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE if HCI Remote Name Request fails - GAP: simulate HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE if HCI Remote Name Request fails
- AVRCP Controller: Added send generic PASS THROUGH command - AVRCP Controller: Added send generic PASS THROUGH command
@ -16,6 +17,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Fixed ### Fixed
- GAP: store link key for standard/non-SSP pairing - GAP: store link key for standard/non-SSP pairing
- BENP: emit channel opened with ERROR_CODE_REMOTE_USER_TERMINATED_CONNECTION if connection cannot be set up - BENP: emit channel opened with ERROR_CODE_REMOTE_USER_TERMINATED_CONNECTION if connection cannot be set up
### Changed ### Changed
- BTstack HID: remove HID_PROTOCOL_MODE_REPORT_WITH_FALLBACK_TO_BOOT - BTstack HID: remove HID_PROTOCOL_MODE_REPORT_WITH_FALLBACK_TO_BOOT

View File

@ -571,7 +571,7 @@ void gap_drop_link_key_for_bd_addr(bd_addr_t addr){
// reset link key stored in connection // reset link key stored in connection
conn->link_key_type = INVALID_LINK_KEY; conn->link_key_type = INVALID_LINK_KEY;
} }
if (!hci_stack->link_key_db) { if (hci_stack->link_key_db != NULL) {
hci_stack->link_key_db->delete_link_key(addr); hci_stack->link_key_db->delete_link_key(addr);
} }
} }