summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap_sock.c
diff options
context:
space:
mode:
authorMarcel Holtmann2013-10-12 16:19:32 +0200
committerJohan Hedberg2013-10-12 16:30:42 +0200
commit3124b84309a0699c98bdc0ef1fc8cd5e058ad5fa (patch)
treefe889b835af2faa61b461ca4b292f54d26563179 /net/bluetooth/l2cap_sock.c
parentBluetooth: Limit security mode 4 level 0 to connection oriented channels (diff)
downloadkernel-qcow2-linux-3124b84309a0699c98bdc0ef1fc8cd5e058ad5fa.tar.gz
kernel-qcow2-linux-3124b84309a0699c98bdc0ef1fc8cd5e058ad5fa.tar.xz
kernel-qcow2-linux-3124b84309a0699c98bdc0ef1fc8cd5e058ad5fa.zip
Bluetooth: Allow 3D profile to use security mode 4 level 0
The PSM 0x0021 is dedicated to the 3D profile and has permission to use security mode 4 level 0 for L2CAP connectionless unicast data transfers. When establishing a L2CAP connectionless channel on PSM 0x0021, it will no longer force Secure Simple Pairing. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/l2cap_sock.c')
-rw-r--r--net/bluetooth/l2cap_sock.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index bee98ebfae4d..bd6fe7fd2737 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -101,6 +101,10 @@ static int l2cap_sock_bind(struct socket *sock, struct sockaddr *addr, int alen)
goto done;
switch (chan->chan_type) {
+ case L2CAP_CHAN_CONN_LESS:
+ if (__le16_to_cpu(la.l2_psm) == L2CAP_PSM_3DSP)
+ chan->sec_level = BT_SECURITY_SDP;
+ break;
case L2CAP_CHAN_CONN_ORIENTED:
if (__le16_to_cpu(la.l2_psm) == L2CAP_PSM_SDP ||
__le16_to_cpu(la.l2_psm) == L2CAP_PSM_RFCOMM)