diff options
author | Nitin Arora <niarora@codeaurora.org> | 2015-07-02 14:08:39 -0700 |
---|---|---|
committer | Andre Eisenbach <eisenbach@google.com> | 2015-07-29 00:51:45 -0700 |
commit | 82c8b9270ba962d5f271a833a3454baddbc063aa (patch) | |
tree | bbe26b8ea7abda0f78fbace35dadf6da73927e85 /stack/btm/btm_sec.c | |
parent | dab356e3b0573303840e63cbafb1065d57a11e2c (diff) | |
download | android_system_bt-82c8b9270ba962d5f271a833a3454baddbc063aa.tar.gz android_system_bt-82c8b9270ba962d5f271a833a3454baddbc063aa.tar.bz2 android_system_bt-82c8b9270ba962d5f271a833a3454baddbc063aa.zip |
Reset LE encryption key size at LE disconnection only
This change checks the transport type on receiving the disconnection
and resets the encryption key size only if the LE disconnection
has taken place.
This fixes the issue where read request to characteristics that
require encryption, fails after cross key derivation due to
disconnection of BR/EDR transport.
Bug: 22515016
Change-Id: If6aad91a628eabbb5a4b7f5c22812fe94d4c5db2
Diffstat (limited to 'stack/btm/btm_sec.c')
-rw-r--r-- | stack/btm/btm_sec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stack/btm/btm_sec.c b/stack/btm/btm_sec.c index dc5aba85f..c3f550f08 100644 --- a/stack/btm/btm_sec.c +++ b/stack/btm/btm_sec.c @@ -4827,7 +4827,6 @@ void btm_sec_disconnected (UINT16 handle, UINT8 reason) } #if BLE_INCLUDED == TRUE && SMP_INCLUDED == TRUE - p_dev_rec->enc_key_size = 0; btm_ble_update_mode_operation(HCI_ROLE_UNKNOWN, p_dev_rec->bd_addr, HCI_SUCCESS); /* see sec_flags processing in btm_acl_removed */ @@ -4835,6 +4834,7 @@ void btm_sec_disconnected (UINT16 handle, UINT8 reason) { p_dev_rec->ble_hci_handle = BTM_SEC_INVALID_HANDLE; p_dev_rec->sec_flags &= ~(BTM_SEC_LE_AUTHENTICATED|BTM_SEC_LE_ENCRYPTED); + p_dev_rec->enc_key_size = 0; } else #endif |