From: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
To: linux-bluetooth@vger.kernel.org
Subject: Re: [bluetooth-next v2 10/16] Bluetooth: Add support for resuming socket when SMP is finished
Date: Mon, 6 Jun 2011 11:44:20 -0300 [thread overview]
Message-ID: <20110606144420.GB3345@piper> (raw)
In-Reply-To: <20110606064341.GA1905@dell>
Hi Johan,
On 15:43 Mon 06 Jun, Johan Hedberg wrote:
> Hi Vinicius,
>
> On Thu, Jun 02, 2011, Vinicius Costa Gomes wrote:
> > @@ -357,21 +375,16 @@ int smp_conn_security(struct l2cap_conn *conn, __u8 sec_level)
> > if (IS_ERR(hcon->hdev->tfm))
> > return 1;
> >
> > - switch (sec_level) {
> > - case BT_SECURITY_MEDIUM:
> > - /* Encrypted, no MITM protection */
> > - authreq = HCI_AT_NO_BONDING_MITM;
> > - break;
> > + if (test_bit(HCI_CONN_ENCRYPT_PEND, &hcon->pend))
> > + return -EINPROGRESS;
>
> This doesn't look right to me. Like hci_conn_security, smp_conn_security
> is supposed to be a boolean function by only returning 0 or 1. That's
> also how all places use it: "if (smp_conn_security(...))". So returning
> a negative error like this looks wrong.
Yeah, this is wrong. Was fixed in a later commit, but will fix here too.
Thanks.
>
> Johan
Cheers,
--
Vinicius
next prev parent reply other threads:[~2011-06-06 14:44 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-02 20:32 [bluetooth-next v2 00/16] SMP Just Works implementation Vinicius Costa Gomes
2011-06-02 20:32 ` [bluetooth-next v2 01/16] Bluetooth: Implement the first SMP commands Vinicius Costa Gomes
2011-06-02 20:32 ` [bluetooth-next v2 02/16] Bluetooth: Start SMP procedure Vinicius Costa Gomes
2011-06-02 20:32 ` [bluetooth-next v2 03/16] Bluetooth: Add simple SMP pairing negotiation Vinicius Costa Gomes
2011-06-02 20:32 ` [bluetooth-next v2 04/16] Bluetooth: Add support for using the crypto subsystem Vinicius Costa Gomes
2011-06-02 20:32 ` [bluetooth-next v2 05/16] Bluetooth: Add LE SMP Cryptoolbox functions Vinicius Costa Gomes
2011-06-06 12:26 ` Luiz Augusto von Dentz
2011-06-06 14:01 ` Vinicius Costa Gomes
2011-06-02 20:32 ` [bluetooth-next v2 06/16] Bluetooth: Add SMP confirmation structs Vinicius Costa Gomes
2011-06-02 20:32 ` [bluetooth-next v2 07/16] Bluetooth: Add SMP confirmation checks methods Vinicius Costa Gomes
2011-06-02 20:32 ` [bluetooth-next v2 08/16] Bluetooth: Add support for LE Start Encryption Vinicius Costa Gomes
2011-06-02 20:32 ` [bluetooth-next v2 09/16] Bluetooth: Remove debug statements Vinicius Costa Gomes
2011-06-02 20:32 ` [bluetooth-next v2 10/16] Bluetooth: Add support for resuming socket when SMP is finished Vinicius Costa Gomes
2011-06-06 6:43 ` Johan Hedberg
2011-06-06 14:44 ` Vinicius Costa Gomes [this message]
2011-06-02 20:32 ` [bluetooth-next v2 11/16] Bluetooth: Fix initial security level of LE links Vinicius Costa Gomes
2011-06-02 20:32 ` [bluetooth-next v2 12/16] Bluetooth: Update the security level when link is encrypted Vinicius Costa Gomes
2011-06-02 20:32 ` [bluetooth-next v2 13/16] Bluetooth: Add support for building pairing commands Vinicius Costa Gomes
2011-06-02 20:32 ` [bluetooth-next v2 14/16] Bluetooth: Add support for Pairing features exchange Vinicius Costa Gomes
2011-06-02 20:32 ` [bluetooth-next v2 15/16] Bluetooth: Add support for SMP timeout Vinicius Costa Gomes
2011-06-02 20:32 ` [bluetooth-next v2 16/16] Bluetooth: Add key size checks for SMP Vinicius Costa Gomes
2011-06-07 21:38 ` [bluetooth-next v2 00/16] SMP Just Works implementation Vinicius Costa Gomes
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=20110606144420.GB3345@piper \
--to=vinicius.gomes@openbossa.org \
--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).