mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-31 19:20:26 +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
|
### Fixed
|
||||||
- SM: prevent random address updates if gap_random_address_set was used
|
- 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: 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
|
- L2CAP: fix use after free on disconnect if ERTM is enabled
|
||||||
- Memory Pools: clear all buffers before use
|
- 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;
|
break;
|
||||||
|
|
||||||
case SM_INITIATOR_PH1_W4_PAIRING_RESPONSE:
|
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){
|
if (sm_pdu_code != SM_CODE_PAIRING_RESPONSE){
|
||||||
sm_pdu_received_in_wrong_state(sm_conn);
|
sm_pdu_received_in_wrong_state(sm_conn);
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user