提交 35d4adcc 编写于 作者: H Hemant Gupta 提交者: Gustavo Padovan

Bluetooth: Don't distribute keys in case of Encryption Failure

SMP Keys should only be distributeed when encryption is successful.
Signed-off-by: NHemant Gupta <hemant.gupta@stericsson.com>
Signed-off-by: NGustavo Padovan <gustavo@padovan.org>
上级 f4001d28
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册