From: Johan Hedberg <johan.hedberg@gmail.com>
To: Vishal Agarwal <vishal.agarwal@stericsson.com>
Cc: linux-bluetooth@vger.kernel.org, naresh.gupta@stericsson.com
Subject: Re: [PATCH] Bluetooth: Link Keys should be stored if MITM is not required
Date: Tue, 3 Apr 2012 12:38:03 +0300 [thread overview]
Message-ID: <20120403093803.GA21118@x220> (raw)
In-Reply-To: <1333444794-27148-1-git-send-email-vishal.agarwal@stericsson.com>
Hi,
On Tue, Apr 03, 2012, Vishal Agarwal wrote:
> If MITM protection is not required then except for Debug Keys, all
> link keys should be persistent. And they should be stored for future
> use.
>
> Change-Id: Id438d424b999e9a30f29193d02ac266bee5f672b
> Signed-off-by: Vishal Agarwal <vishal.agarwal@stericsson.com>
> ---
> net/bluetooth/hci_core.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
> index c5ee97c..bcb68dd 100644
> --- a/net/bluetooth/hci_core.c
> +++ b/net/bluetooth/hci_core.c
> @@ -1246,6 +1246,10 @@ static int hci_persistent_key(struct hci_dev *hdev, struct hci_conn *conn,
> if (conn->remote_auth == 0x02 || conn->remote_auth == 0x03)
> return 1;
>
> + /* If MITM is not required then store the Link Key */
> + if (!(conn->auth_type & 0x01))
> + return 1;
> +
> /* If none of the above criteria match, then don't store the key
> * persistently */
> return 0;
Nack.
This doesn't make much sense to me. Why should the MITM flag have
anything to do with the persistency of the key?
This looks more like a workaround for some device that is incorrectly
having a no-bonding requirement (which means that we should *not* store
the key). Please describe what kind of setup you've seen this with and
include a hcidump for it showing the local and remote authentication
requirement and IO capabilities.
Johan
next prev parent reply other threads:[~2012-04-03 9:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-03 9:19 [PATCH] Bluetooth: Link Keys should be stored if MITM is not required Vishal Agarwal
2012-04-03 9:38 ` Johan Hedberg [this message]
2012-04-03 9:57 ` Vishal AGARWAL
2012-04-03 10:21 ` Johan Hedberg
2012-04-03 11:41 ` Johan Hedberg
2012-04-04 3:34 ` vishal agarwal
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=20120403093803.GA21118@x220 \
--to=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=naresh.gupta@stericsson.com \
--cc=vishal.agarwal@stericsson.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