sm: fix update of sc flag for re-encrypted connection in peripheral role

# Conflicts:
#	CHANGELOG.md
This commit is contained in:
Matthias Ringwald 2020-11-04 16:06:30 +01:00
parent 6ccd824859
commit dd583d9fc5
2 changed files with 3 additions and 2 deletions

View File

@ -15,7 +15,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## Changes November 2020 ## Changes November 2020
### Fixed ### Fixed
L2CAP: trigger pairing for outgoing LE Data Channels if security level insufficient - L2CAP: trigger pairing for outgoing LE Data Channels if security level insufficient
- SM: fix update of sc flag for re-encrypted connection in peripheral role
### Added ### Added

View File

@ -3443,7 +3443,6 @@ static void sm_event_packet_handler (uint8_t packet_type, uint16_t channel, uint
} }
if (!sm_conn->sm_connection_encrypted) break; if (!sm_conn->sm_connection_encrypted) break;
sm_conn->sm_connection_sc = setup->sm_use_secure_connections;
// continue pairing // continue pairing
switch (sm_conn->sm_engine_state){ switch (sm_conn->sm_engine_state){
@ -3452,6 +3451,7 @@ static void sm_event_packet_handler (uint8_t packet_type, uint16_t channel, uint
sm_done_for_handle(sm_conn->sm_handle); sm_done_for_handle(sm_conn->sm_handle);
break; break;
case SM_PH2_W4_CONNECTION_ENCRYPTED: case SM_PH2_W4_CONNECTION_ENCRYPTED:
sm_conn->sm_connection_sc = setup->sm_use_secure_connections;
if (IS_RESPONDER(sm_conn->sm_role)){ if (IS_RESPONDER(sm_conn->sm_role)){
// slave // slave
if (setup->sm_use_secure_connections){ if (setup->sm_use_secure_connections){