diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f7eec4a7..26e15d5d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed - GATT Server: Allow enable Notifications/Indication with Write Command. Fixes issue with some Android devices. +- SM: Fix pairing for Secure Connections with Bonding if remote sends additional keys ## Changes June 2018 diff --git a/src/ble/sm.c b/src/ble/sm.c index 7e4ce5c7b..1de7781de 100644 --- a/src/ble/sm.c +++ b/src/ble/sm.c @@ -964,7 +964,7 @@ static int sm_key_distribution_all_received(sm_connection_t * sm_conn){ #endif log_debug("sm_key_distribution_all_received: received 0x%02x, expecting 0x%02x", setup->sm_key_distribution_received_set, recv_flags); - return recv_flags == setup->sm_key_distribution_received_set; + return (setup->sm_key_distribution_received_set & recv_flags) == recv_flags; } static void sm_done_for_handle(hci_con_handle_t con_handle){