From 7a2e63879d57860d229c0f7788838f28e611a3b9 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Thu, 26 Oct 2017 15:01:20 +0200 Subject: [PATCH] sm: fix storing of bonding infomation for LE Legacy Pairing. Bug introduced in 4c1d10929 --- src/ble/sm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ble/sm.c b/src/ble/sm.c index e2b4d48b2..1aeab6fc6 100644 --- a/src/ble/sm.c +++ b/src/ble/sm.c @@ -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;