gap: store link key for standard/non-SSP pairing

# Conflicts:
#	CHANGELOG.md
This commit is contained in:
Matthias Ringwald 2025-01-13 18:51:04 +01:00
parent 565100c1ca
commit 501e6d2b86
2 changed files with 6 additions and 7 deletions

View File

@ -9,10 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## Unreleased
### Added
### Fixed
- HFP: use 'don't care' to accept SCO connections, fixes issue on ESP32
- HFP: fix LC3-WB init
- HFP AG: fix setup of audio connection in service level established event
- GAP: store link key for standard/non-SSP pairing
### Changed

View File

@ -4027,9 +4027,11 @@ static void event_handler(uint8_t *packet, uint16_t size){
if (hci_stack->bondable == false) break;
// - if at least one side requests bonding during the IO Capabilities exchange.
// Note: we drop bonding flag in acceptor role if remote doesn't request it
bool bonding_local = conn->io_cap_request_auth_req >= SSP_IO_AUTHREQ_MITM_PROTECTION_NOT_REQUIRED_DEDICATED_BONDING;
bool bonding_remote = conn->io_cap_response_auth_req >= SSP_IO_AUTHREQ_MITM_PROTECTION_NOT_REQUIRED_DEDICATED_BONDING;
if ((bonding_local == false) && (bonding_remote == false)) break;
if (conn->link_key_type != COMBINATION_KEY) {
bool bonding_local = conn->io_cap_request_auth_req >= SSP_IO_AUTHREQ_MITM_PROTECTION_NOT_REQUIRED_DEDICATED_BONDING;
bool bonding_remote = conn->io_cap_response_auth_req >= SSP_IO_AUTHREQ_MITM_PROTECTION_NOT_REQUIRED_DEDICATED_BONDING;
if ((bonding_local == false) && (bonding_remote == false)) break;
}
// - if security level sufficient
if (gap_security_level_for_link_key_type(link_key_type) < conn->requested_security_level) break;
gap_store_link_key_for_bd_addr(addr, &packet[8], conn->link_key_type);