summaryrefslogtreecommitdiff
path: root/net/bluetooth/hci_conn.c
diff options
context:
space:
mode:
authorVinicius Costa Gomes <vinicius.gomes@openbossa.org>2012-08-23 21:32:44 -0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-02 10:30:34 -0700
commitc031edca540afb66764db24eed10eb149ac6c852 (patch)
tree867a052756c1bb8942b407f7098a3da4ea95261d /net/bluetooth/hci_conn.c
parent0fcc0805df9cf7483e927cf6a4dc94938318c06a (diff)
downloadlinux-3.10-c031edca540afb66764db24eed10eb149ac6c852.tar.gz
linux-3.10-c031edca540afb66764db24eed10eb149ac6c852.tar.bz2
linux-3.10-c031edca540afb66764db24eed10eb149ac6c852.zip
Bluetooth: Fix sending a HCI Authorization Request over LE links
commit d8343f125710fb596f7a88cd756679f14f4e77b9 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/bluetooth/hci_conn.c')
-rw-r--r--net/bluetooth/hci_conn.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 5238b6b3ea6..39b2baf6c1d 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -42,6 +42,7 @@
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
+#include <net/bluetooth/smp.h>
static void hci_le_connect(struct hci_conn *conn)
{
@@ -661,6 +662,9 @@ int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type)
{
BT_DBG("conn %p", conn);
+ if (conn->type == LE_LINK)
+ return smp_conn_security(conn, sec_level);
+
/* For sdp we don't need the link key. */
if (sec_level == BT_SECURITY_SDP)
return 1;