From: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
To: "Gustavo F. Padovan" <padovan@profusion.mobi>
Cc: linux-bluetooth@vger.kernel.org,
Anderson Briglia <anderson.briglia@openbossa.org>
Subject: Re: [RFC v2 3/9] Bluetooth: Start SMP procedure
Date: Tue, 7 Dec 2010 19:08:14 -0300 [thread overview]
Message-ID: <20101207220814.GF4797@eris> (raw)
In-Reply-To: <20101207161109.GD2944@vigoh>
Hi Gustavo,
On 14:11 Tue 07 Dec, Gustavo F. Padovan wrote:
> Hi Vinicius,
>
> * Vinicius Costa Gomes <vinicius.gomes@openbossa.org> [2010-12-06 18:43:46 -0300]:
>
> > From: Anderson Briglia <anderson.briglia@openbossa.org>
> >
> > Start SMP procedure for LE connections. This modification intercepts l2cap
> > received frames and call proper SMP functions to start the SMP procedure. By
> > now, no keys are being used.
> >
> > Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
> > Signed-off-by: Anderson Briglia <anderson.briglia@openbossa.org>
> > ---
> > net/bluetooth/l2cap_core.c | 7 +++++++
> > net/bluetooth/smp.c | 2 +-
> > 2 files changed, 8 insertions(+), 1 deletions(-)
> >
> > diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
> > index 69e5f80..674799c 100644
> > --- a/net/bluetooth/l2cap_core.c
> > +++ b/net/bluetooth/l2cap_core.c
> > @@ -54,6 +54,7 @@
> > #include <net/bluetooth/bluetooth.h>
> > #include <net/bluetooth/hci_core.h>
> > #include <net/bluetooth/l2cap.h>
> > +#include <net/bluetooth/smp.h>
> >
> > #define VERSION "2.15"
> >
> > @@ -642,6 +643,8 @@ static void l2cap_conn_ready(struct l2cap_conn *conn)
> > l2cap_sock_clear_timer(sk);
> > sk->sk_state = BT_CONNECTED;
> > sk->sk_state_change(sk);
> > + if (smp_conn_security(conn, l2cap_pi(sk)->sec_level))
> > + BT_DBG("Insufficient security");
> > }
> >
> > if (sk->sk_type != SOCK_SEQPACKET &&
> > @@ -4626,6 +4629,10 @@ static void l2cap_recv_frame(struct l2cap_conn *conn, struct sk_buff *skb)
> > l2cap_conless_channel(conn, psm, skb);
> > break;
> >
> > + case L2CAP_CID_SMP:
> > + smp_sig_channel(conn, skb);
> > + break;
> > +
> > default:
> > l2cap_data_channel(conn, cid, skb);
> > break;
> > diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
> > index e427d11..e9dde5f 100644
> > --- a/net/bluetooth/smp.c
> > +++ b/net/bluetooth/smp.c
> > @@ -86,7 +86,7 @@ int smp_conn_security(struct l2cap_conn *conn, __u8 sec_level)
> > return 1;
> > }
> >
> > - if (conn->hcon->link_mode & HCI_LM_MASTER) {
> > + if (conn->hcon->out) {
>
> This change should not belong to this patch.
>
My bad. Will fix.
> --
> Gustavo F. Padovan
> http://profusion.mobi
Cheers,
--
Vinicius
next prev parent reply other threads:[~2010-12-07 22:08 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-06 21:43 [RFC v2 0/9] SMP Implementation Vinicius Costa Gomes
2010-12-06 21:43 ` [RFC v2 1/9] Bluetooth: Add SMP command structures Vinicius Costa Gomes
2010-12-06 21:43 ` [RFC v2 2/9] Bluetooth: Implement the first SMP commands Vinicius Costa Gomes
2010-12-07 16:03 ` Gustavo F. Padovan
2010-12-07 22:05 ` Vinicius Costa Gomes
2010-12-07 16:10 ` Gustavo F. Padovan
2010-12-07 22:06 ` Vinicius Costa Gomes
2010-12-06 21:43 ` [RFC v2 3/9] Bluetooth: Start SMP procedure Vinicius Costa Gomes
2010-12-07 16:11 ` Gustavo F. Padovan
2010-12-07 22:08 ` Vinicius Costa Gomes [this message]
2010-12-06 21:43 ` [RFC v2 4/9] Bluetooth: simple SMP pairing negotiation Vinicius Costa Gomes
2010-12-07 16:39 ` Gustavo F. Padovan
2010-12-07 18:26 ` Brian Gix
2010-12-07 22:27 ` Vinicius Costa Gomes
2010-12-06 21:43 ` [RFC v2 5/9] Bluetooth: Add support for using the crypto subsystem Vinicius Costa Gomes
2010-12-07 17:27 ` Gustavo F. Padovan
2010-12-07 17:51 ` Vinicius Costa Gomes
2010-12-07 18:05 ` Gustavo F. Padovan
2010-12-07 18:35 ` Brian Gix
2010-12-07 19:06 ` Anderson Lizardo
2010-12-07 19:21 ` Brian Gix
2010-12-07 19:23 ` Vinicius Costa Gomes
2010-12-07 19:34 ` Brian Gix
2010-12-06 21:43 ` [RFC v2 6/9] Bluetooth: LE SMP Cryptoolbox functions Vinicius Costa Gomes
2010-12-06 21:43 ` [RFC v2 7/9] Bluetooth: Add support for SMP confirmation checks Vinicius Costa Gomes
2010-12-07 17:41 ` Gustavo F. Padovan
2010-12-08 5:48 ` Koustuv Ghosh
2010-12-08 6:33 ` Brian Gix
2010-12-08 6:19 ` Koustuv Ghosh
2010-12-06 21:43 ` [RFC v2 8/9] Bluetooth: Add support for LE Start Encryption Vinicius Costa Gomes
2010-12-07 17:38 ` Gustavo F. Padovan
2010-12-07 18:58 ` Brian Gix
2010-12-06 21:43 ` [RFC v2 9/9] Bluetooth: Add support for resuming socket when SMP is finished 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=20101207220814.GF4797@eris \
--to=vinicius.gomes@openbossa.org \
--cc=anderson.briglia@openbossa.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=padovan@profusion.mobi \
/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).