mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-25 19:07:46 +00:00
Bluetooth: Don't distribute keys in case of Encryption Failure
SMP Keys should only be distributeed when encryption is successful. Signed-off-by: Hemant Gupta <hemant.gupta@stericsson.com> Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
This commit is contained in:
parent
f4001d2846
commit
35d4adcca1
@ -4813,7 +4813,8 @@ int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt)
|
||||
BT_DBG("conn %p", conn);
|
||||
|
||||
if (hcon->type == LE_LINK) {
|
||||
smp_distribute_keys(conn, 0);
|
||||
if (!status && encrypt)
|
||||
smp_distribute_keys(conn, 0);
|
||||
cancel_delayed_work(&conn->security_timer);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user