mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-29 10:01:25 +00:00
Bluetooth: Fix sending a HCI Authorization Request over LE links
In the case that the link is already in the connected state and a Pairing request arrives from the mgmt interface, hci_conn_security() would be called but it was not considering LE links. Reported-by: João Paulo Rechi Vita <jprvita@openbossa.org> Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
This commit is contained in:
parent
cc110922da
commit
d8343f1257
1 changed files with 4 additions and 0 deletions
|
@ -29,6 +29,7 @@
|
||||||
#include <net/bluetooth/bluetooth.h>
|
#include <net/bluetooth/bluetooth.h>
|
||||||
#include <net/bluetooth/hci_core.h>
|
#include <net/bluetooth/hci_core.h>
|
||||||
#include <net/bluetooth/a2mp.h>
|
#include <net/bluetooth/a2mp.h>
|
||||||
|
#include <net/bluetooth/smp.h>
|
||||||
|
|
||||||
static void hci_le_connect(struct hci_conn *conn)
|
static void hci_le_connect(struct hci_conn *conn)
|
||||||
{
|
{
|
||||||
|
@ -619,6 +620,9 @@ int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type)
|
||||||
{
|
{
|
||||||
BT_DBG("hcon %p", conn);
|
BT_DBG("hcon %p", conn);
|
||||||
|
|
||||||
|
if (conn->type == LE_LINK)
|
||||||
|
return smp_conn_security(conn, sec_level);
|
||||||
|
|
||||||
/* For sdp we don't need the link key. */
|
/* For sdp we don't need the link key. */
|
||||||
if (sec_level == BT_SECURITY_SDP)
|
if (sec_level == BT_SECURITY_SDP)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue