From: Johan Hedberg <johan.hedberg@gmail.com>
To: Marcin Kraglak <marcin.kraglak@tieto.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Bluetooth: Allow change security level on ATT_CID in slave role
Date: Fri, 13 Jun 2014 15:20:55 +0300 [thread overview]
Message-ID: <20140613122055.GA11990@t440s.lan> (raw)
In-Reply-To: <1402661302-26674-1-git-send-email-marcin.kraglak@tieto.com>
Hi Marcin,
On Fri, Jun 13, 2014, Marcin Kraglak wrote:
> Kernel supports SMP Security Request so don't block increasing security
> when we are slave.
>
> Signed-off-by: Marcin Kraglak <marcin.kraglak@tieto.com>
> ---
> net/bluetooth/l2cap_sock.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
> index 6ab2822..55215eb 100644
> --- a/net/bluetooth/l2cap_sock.c
> +++ b/net/bluetooth/l2cap_sock.c
> @@ -787,11 +787,6 @@ static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname,
>
> /*change security for LE channels */
> if (chan->scid == L2CAP_CID_ATT) {
> - if (!conn->hcon->out) {
> - err = -EINVAL;
> - break;
> - }
> -
> if (smp_conn_security(conn->hcon, sec.level))
> break;
> sk->sk_state = BT_CONFIG;
Acked-by: Johan Hedberg <johan.hedberg@intel.com>
Though this could potentially have used a bit more verbose description.
The code in question seems to originate from the early days of SMP where
we probably didn't yet have fully functioning slave-role support. Now
it's there and calls to smp_conn_security() as slave should just do the
right thing.
Johan
next prev parent reply other threads:[~2014-06-13 12:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-13 12:08 [PATCH] Bluetooth: Allow change security level on ATT_CID in slave role Marcin Kraglak
2014-06-13 12:20 ` Johan Hedberg [this message]
2014-06-13 12:58 ` Marcel Holtmann
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=20140613122055.GA11990@t440s.lan \
--to=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcin.kraglak@tieto.com \
/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