From: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
To: Ido Yariv <ido@wizery.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [RFC] Bluetooth: Set security level on incoming pairing request
Date: Tue, 6 Mar 2012 01:28:31 -0300 [thread overview]
Message-ID: <20120306042831.GD3869@tori.lan> (raw)
In-Reply-To: <1330970978-10963-1-git-send-email-ido@wizery.com>
Hi Ido,
On 20:09 Mon 05 Mar, Ido Yariv wrote:
> 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>
> ---
> net/bluetooth/smp.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
Acked-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
> diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
> index ebf50065..17bf2ae 100644
> --- a/net/bluetooth/smp.c
> +++ b/net/bluetooth/smp.c
> @@ -592,6 +592,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);
> --
> 1.7.7.6
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Cheers,
--
Vinicius
prev parent reply other threads:[~2012-03-06 4:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-05 18:09 [RFC] Bluetooth: Set security level on incoming pairing request Ido Yariv
2012-03-06 4:28 ` Vinicius Costa Gomes [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120306042831.GD3869@tori.lan \
--to=vinicius.gomes@openbossa.org \
--cc=ido@wizery.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).