mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-26 02:37:41 +00:00
sm: ignore Slave Security Request after sending own Pairing Request
This commit is contained in:
parent
73704aa932
commit
aacfafc3ac
@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
### Fixed
|
||||
- SM: prevent random address updates if gap_random_address_set was used
|
||||
- SM: fix internal buffer overrun that can cause storing of bonding information to fail
|
||||
- SM: ignore Slave Security Request after sending own Pairing Request
|
||||
- L2CAP: fix use after free on disconnect if ERTM is enabled
|
||||
- Memory Pools: clear all buffers before use
|
||||
|
||||
|
@ -3277,6 +3277,15 @@ static void sm_pdu_handler(uint8_t packet_type, hci_con_handle_t con_handle, uin
|
||||
break;
|
||||
|
||||
case SM_INITIATOR_PH1_W4_PAIRING_RESPONSE:
|
||||
// Core 5, Vol 3, Part H, 2.4.6:
|
||||
// "The master shall ignore the slave’s Security Request if the master has sent a Pairing Request
|
||||
// without receiving a Pairing Response from the slave or if the master has initiated encryption mode setup."
|
||||
if (sm_pdu_code == SM_CODE_SECURITY_REQUEST){
|
||||
log_info("Ignoring Security Request");
|
||||
break;
|
||||
}
|
||||
|
||||
// all other pdus are incorrect
|
||||
if (sm_pdu_code != SM_CODE_PAIRING_RESPONSE){
|
||||
sm_pdu_received_in_wrong_state(sm_conn);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user