From: bugzilla-daemon@bugzilla.kernel.org
To: linux-bluetooth@vger.kernel.org
Subject: [Bug 203997] [REGRESSION] Unable to connect BT audio device on 5.1.15
Date: Mon, 01 Jul 2019 07:15:23 +0000 [thread overview]
Message-ID: <bug-203997-62941-FDKBI4ez5w@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-203997-62941@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=203997
--- Comment #8 from Matias Karhumaa (matias.karhumaa@gmail.com) ---
Ah, I think recent regression fix [1] caused another bug:
--snip--
static bool l2cap_check_enc_key_size(struct hci_conn *hcon)
{
/* The minimum encryption key size needs to be enforced by the
* host stack before establishing any L2CAP connections. The
* specification in theory allows a minimum of 1, but to align
* BR/EDR and LE transports, a minimum of 7 is chosen.
*
* This check might also be called for unencrypted connections
* that have no key size requirements. Ensure that the link is
* actually encrypted before enforcing a key size.
*/
return (!test_bit(HCI_CONN_ENCRYPT, &hcon->flags) ||
hcon->enc_key_size > HCI_MIN_ENC_KEY_SIZE);
}
--snip--
If Encryption key size is 7, L2CAP connection will fail. I think it should be
something like this:
In l2cap_core.c
static bool l2cap_check_enc_key_size(struct hci_conn *hcon)
{
/* The minimum encryption key size needs to be enforced by the
* host stack before establishing any L2CAP connections. The
* specification in theory allows a minimum of 1, but to align
* BR/EDR and LE transports, a minimum of 7 is chosen.
*
* This check might also be called for unencrypted connections
* that have no key size requirements. Ensure that the link is
* actually encrypted before enforcing a key size.
*/
return (!test_bit(HCI_CONN_ENCRYPT, &hcon->flags) ||
hcon->enc_key_size >= HCI_MIN_ENC_KEY_SIZE);
}
--snip--
Could you test the fix?
[1]:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/net/bluetooth?id=693cd8ce3f882524a5d06f7800dd8492411877b3
--
You are receiving this mail because:
You are the assignee for the bug.
next prev parent reply other threads:[~2019-07-01 7:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-203997-62941@https.bugzilla.kernel.org/>
2019-06-27 0:22 ` [Bug 203997] [REGRESSION] Unable to connect BT audio device on 5.1.15 bugzilla-daemon
2019-06-27 13:35 ` bugzilla-daemon
2019-06-28 13:05 ` bugzilla-daemon
2019-07-01 7:15 ` bugzilla-daemon [this message]
2019-07-01 12:23 ` bugzilla-daemon
2019-07-07 11:33 ` bugzilla-daemon
2019-07-07 11:43 ` bugzilla-daemon
2019-09-02 11:44 ` bugzilla-daemon
2019-09-02 11:49 ` bugzilla-daemon
2019-09-03 12:37 ` bugzilla-daemon
2019-09-03 12:45 ` bugzilla-daemon
2019-09-08 12:19 ` bugzilla-daemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-203997-62941-FDKBI4ez5w@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@bugzilla.kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).