summaryrefslogtreecommitdiff
path: root/net/bluetooth
diff options
context:
space:
mode:
authorIdo Yariv <ido@wizery.com>2012-03-05 20:09:38 +0200
committerGustavo F. Padovan <padovan@profusion.mobi>2012-03-08 02:26:04 -0300
commitfdde0a26a218d95e2ea38c0838ab6f24040af14c (patch)
treed75f8452272fb189a19312ca406ee3a672d6ef0a /net/bluetooth
parentb3ff53ff006b7906c88adf9d0fccc06a8877fae1 (diff)
downloadlinux-3.10-fdde0a26a218d95e2ea38c0838ab6f24040af14c.tar.gz
linux-3.10-fdde0a26a218d95e2ea38c0838ab6f24040af14c.tar.bz2
linux-3.10-fdde0a26a218d95e2ea38c0838ab6f24040af14c.zip
Bluetooth: Set security level on incoming pairing request
If a master would like to raise the security level, it will send a pairing request. While the pending security level is set on an incoming security request (from a slave), it is not set on a pairing request. As a result, the security level would not be raised on the slave in such case. Fix this by setting the pending security when receiving pairing requests according to the requested authorization. Signed-off-by: Ido Yariv <ido@wizery.com> Acked-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/smp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index 9883d673873..deb119875fd 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -589,6 +589,8 @@ static u8 smp_cmd_pairing_req(struct l2cap_conn *conn, struct sk_buff *skb)
if (req->auth_req & SMP_AUTH_BONDING)
auth = req->auth_req;
+ conn->hcon->pending_sec_level = authreq_to_seclevel(auth);
+
build_pairing_cmd(conn, req, &rsp, auth);
key_size = min(req->max_key_size, rsp.max_key_size);