From: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
To: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 2/3] Bluetooth: Fix not sending a Link Key Negative Reply
Date: Mon, 5 Sep 2011 11:19:50 -0300 [thread overview]
Message-ID: <20110905141950.GA26578@samus.indt.org> (raw)
In-Reply-To: <20110905081842.GA3517@dell.ger.corp.intel.com>
Hi Johan,
On 11:18 Mon 05 Sep, Johan Hedberg wrote:
> Hi Vinicius,
>
> On Fri, Sep 02, 2011, Vinicius Costa Gomes wrote:
> > In the case that there are no keys loaded in the adapter, we should
> > also respond the Link Key Request event with the Link Key Negative
> > Reply command.
> >
> > Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
> > ---
> > net/bluetooth/hci_event.c | 8 +++++---
> > 1 files changed, 5 insertions(+), 3 deletions(-)
> >
> > diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
> > index 8404cd9..79f89d2 100644
> > --- a/net/bluetooth/hci_event.c
> > +++ b/net/bluetooth/hci_event.c
> > @@ -2208,11 +2208,13 @@ static inline void hci_link_key_request_evt(struct hci_dev *hdev, struct sk_buff
> >
> > BT_DBG("%s", hdev->name);
> >
> > - if (!test_bit(HCI_LINK_KEYS, &hdev->flags))
> > - return;
> > -
> > hci_dev_lock(hdev);
> >
> > + if (!test_bit(HCI_LINK_KEYS, &hdev->flags)) {
> > + BT_DBG("%s has no keys", hdev->name);
> > + goto not_found;
> > + }
> > +
> > key = hci_find_link_key(hdev, &ev->bdaddr);
> > if (!key) {
> > BT_DBG("%s link key not found for %s", hdev->name,
> > --
> > 1.7.6.1
>
> Nack. The purpose of this check in the beginning of the function is to
> prevent breakage on systems that do not use the management interface.
> With your patch you'd break all systems that use hciops. The
> HCI_LINK_KEYS bit will only be set when user space sends the
> MGMT_OP_LOAD_KEYS command.
Ok. This patch is to be ignored then. The rest of the series should should
still be considered.
>
> Johan
Cheers,
--
Vinicius
next prev parent reply other threads:[~2011-09-05 14:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-02 17:51 [PATCH 0/3] Fix Legacy Pairing using the mgmt interface Vinicius Costa Gomes
2011-09-02 17:51 ` [PATCH 1/3] Bluetooth: Require authentication if MITM protection is requested Vinicius Costa Gomes
2011-09-02 17:51 ` [PATCH 2/3] Bluetooth: Fix not sending a Link Key Negative Reply Vinicius Costa Gomes
2011-09-05 8:18 ` Johan Hedberg
2011-09-05 14:19 ` Vinicius Costa Gomes [this message]
2011-09-02 17:51 ` [PATCH 3/3] Bluetooth: Use the MEDIUM security level for pairings Vinicius Costa Gomes
2011-09-14 1:56 ` Gustavo Padovan
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=20110905141950.GA26578@samus.indt.org \
--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