aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-02-08 21:55:28 -0500
committerMarcel Holtmann <marcel@holtmann.org>2009-02-27 00:14:41 -0500
commit435fef20acfc48f46476abad55b0cd3aa47b8365 (patch)
tree8871de70ce8fedb293683b73d56d09582318ced0 /include/net/bluetooth
parent6a8d3010b313d99adbb28f1826fac0234395bb26 (diff)
Bluetooth: Don't enforce authentication for L2CAP PSM 1 and 3
The recommendation for the L2CAP PSM 1 (SDP) is to not use any kind of authentication or encryption. So don't trigger authentication for incoming and outgoing SDP connections. For L2CAP PSM 3 (RFCOMM) there is no clear requirement, but with Bluetooth 2.1 the initiator is required to enable authentication and encryption first and this gets enforced. So there is no need to trigger an additional authentication step. The RFCOMM service security will make sure that a secure enough link key is present. When the encryption gets enabled after the SDP connection setup, then switch the security level from SDP to low security. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net/bluetooth')
-rw-r--r--include/net/bluetooth/hci_core.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index f75028b33883..9473fce499e7 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -597,6 +597,9 @@ static inline void hci_encrypt_cfm(struct hci_conn *conn, __u8 status, __u8 encr
597{ 597{
598 struct list_head *p; 598 struct list_head *p;
599 599
600 if (conn->sec_level == BT_SECURITY_SDP)
601 conn->sec_level = BT_SECURITY_LOW;
602
600 hci_proto_encrypt_cfm(conn, status, encrypt); 603 hci_proto_encrypt_cfm(conn, status, encrypt);
601 604
602 read_lock_bh(&hci_cb_list_lock); 605 read_lock_bh(&hci_cb_list_lock);