mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
Bluetooth: L2CAP: Fix not responding with L2CAP_CR_LE_ENCRYPTION
Depending on the security set the response to L2CAP_LE_CONN_REQ shall be
just L2CAP_CR_LE_ENCRYPTION if only encryption when BT_SECURITY_MEDIUM
is selected since that means security mode 2 which doesn't require
authentication which is something that is covered in the qualification
test L2CAP/LE/CFC/BV-25-C.
Link: https://github.com/bluez/bluez/issues/1270
Fixes: 27e2d4c8d2
("Bluetooth: Add basic LE L2CAP connect request receiving support")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
0fb410c914
commit
03dba9cea7
@ -4870,7 +4870,8 @@ static int l2cap_le_connect_req(struct l2cap_conn *conn,
|
|||||||
|
|
||||||
if (!smp_sufficient_security(conn->hcon, pchan->sec_level,
|
if (!smp_sufficient_security(conn->hcon, pchan->sec_level,
|
||||||
SMP_ALLOW_STK)) {
|
SMP_ALLOW_STK)) {
|
||||||
result = L2CAP_CR_LE_AUTHENTICATION;
|
result = pchan->sec_level == BT_SECURITY_MEDIUM ?
|
||||||
|
L2CAP_CR_LE_ENCRYPTION : L2CAP_CR_LE_AUTHENTICATION;
|
||||||
chan = NULL;
|
chan = NULL;
|
||||||
goto response_unlock;
|
goto response_unlock;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user