From: johan.hedberg@gmail.com
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH] Bluetooth: Respect local MITM req in io_cap reply
Date: Wed, 27 Apr 2011 16:09:47 -0700 [thread overview]
Message-ID: <1303945787-25951-1-git-send-email-johan.hedberg@gmail.com> (raw)
In-Reply-To: <1303372461-11848-6-git-send-email-waldemar.rymarkiewicz@tieto.com>
From: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
If host requires MITM protection notify that to controller in
io capabilities reply even if the remote device requires no bonding.
If it is not respected, host can get an unauthenticated link key while
it expects authenticated one.
Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
---
net/bluetooth/hci_event.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index cba0bdb..3c90736 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -2369,7 +2369,7 @@ static inline u8 hci_get_auth_req(struct hci_conn *conn)
/* If remote requests no-bonding follow that lead */
if (conn->remote_auth == 0x00 || conn->remote_auth == 0x01)
- return 0x00;
+ return conn->remote_auth | (conn->auth_type & 0x01);
return conn->auth_type;
}
--
1.7.4.4
prev parent reply other threads:[~2011-04-27 23:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-21 7:54 [PATCH v2 1/6] Bluetooth: Add definitions for link key types Waldemar Rymarkiewicz
2011-04-21 7:54 ` [PATCH v2 2/6] Bluetooth: Don't modify sec_level if auth failed Waldemar Rymarkiewicz
2011-04-21 7:54 ` [PATCH v2 3/6] Bluetooth: Map sec_level to link key requirements Waldemar Rymarkiewicz
2011-04-21 10:02 ` Waldemar.Rymarkiewicz
2011-04-21 7:54 ` [PATCH v2 4/6] Bluetooth: Ignore key unauthenticated for high security Waldemar Rymarkiewicz
2011-04-21 7:54 ` [PATCH v2 5/6] Bluetooth: Double check sec req for pre 2.1 device Waldemar Rymarkiewicz
2011-04-21 9:53 ` Waldemar.Rymarkiewicz
2011-04-21 7:54 ` [PATCH v2 6/6] Bluetooth: Respect local MITM req in io_cap reply Waldemar Rymarkiewicz
2011-04-21 8:10 ` Johan Hedberg
2011-04-21 8:24 ` Waldemar.Rymarkiewicz
2011-04-25 17:09 ` Luiz Augusto von Dentz
2011-04-26 23:59 ` Johan Hedberg
2011-04-27 23:09 ` johan.hedberg [this message]
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=1303945787-25951-1-git-send-email-johan.hedberg@gmail.com \
--to=johan.hedberg@gmail.com \
--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