Bluetooth: LE sockets not ready until encrypted
If encryption fails during socket setup, the L2CAP channel should not be marked as Ready until after re-pairing takes place. Change-Id: I57a07ae72d4a57584c9367db9a832f4560629ac7 CRs-fixed: 335988 Signed-off-by: Brian Gix <bgix@codeaurora.org>
This commit is contained in:
@@ -7440,11 +7440,12 @@ static int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt)
|
||||
BT_DBG("sk->scid %d", l2cap_pi(sk)->scid);
|
||||
|
||||
if (l2cap_pi(sk)->scid == L2CAP_CID_LE_DATA) {
|
||||
if (!status && encrypt)
|
||||
if (!status && encrypt) {
|
||||
l2cap_pi(sk)->sec_level = hcon->sec_level;
|
||||
l2cap_chan_ready(sk);
|
||||
}
|
||||
|
||||
del_timer(&hcon->smp_timer);
|
||||
l2cap_chan_ready(sk);
|
||||
smp_link_encrypt_cmplt(conn, status, encrypt);
|
||||
|
||||
bh_unlock_sock(sk);
|
||||
|
||||
Reference in New Issue
Block a user