summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/smp.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2013-11-15 14:18:45 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-11-15 14:18:45 -0500
commit32019c739c95d056575e0bb2381f2846c0c49944 (patch)
treea3134c8c8c74094b936b73906954c7e77f531cf9 /net/bluetooth/smp.c
parent8e3ffa471091c560deb6738ed9ab7445b7a5fd04 (diff)
parent86ca9eac31d0d8c4fe61b5726e6d63197bc435a6 (diff)
downloadlinux-32019c739c95d056575e0bb2381f2846c0c49944.tar.bz2
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth
Diffstat (limited to 'net/bluetooth/smp.c')
-rw-r--r--net/bluetooth/smp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index 85a2796cac61..4b07acb8293c 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -742,6 +742,9 @@ static u8 smp_cmd_security_req(struct l2cap_conn *conn, struct sk_buff *skb)
BT_DBG("conn %p", conn);
+ if (!(conn->hcon->link_mode & HCI_LM_MASTER))
+ return SMP_CMD_NOTSUPP;
+
hcon->pending_sec_level = authreq_to_seclevel(rp->auth_req);
if (smp_ltk_encrypt(conn, hcon->pending_sec_level))