sm: fix storing of bonding infomation for LE Legacy Pairing. Bug introduced in 4c1d10929

This commit is contained in:
Matthias Ringwald 2017-10-26 15:01:20 +02:00
parent 98d95509d1
commit 7a2e63879d

View File

@ -3435,7 +3435,7 @@ static const uint8_t sm_pdu_size[] = {
17, // 0x04 pairing random
2, // 0x05 pairing failed
17, // 0x06 encryption information
8, // 0x07 master identification
11, // 0x07 master identification
17, // 0x08 identification information
8, // 0x09 identify address information
17, // 0x0a signing information
@ -3458,7 +3458,7 @@ static void sm_pdu_handler(uint8_t packet_type, hci_con_handle_t con_handle, uin
// validate pdu size
if (sm_pdu_code >= sizeof(sm_pdu_size)) return;
if (sm_pdu_size[sm_pdu_code] < size) return;
if (sm_pdu_size[sm_pdu_code] != size) return;
sm_connection_t * sm_conn = sm_get_connection_for_handle(con_handle);
if (!sm_conn) return;