All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: Link Keys should be stored if MITM is not required
@ 2012-04-03  9:19 Vishal Agarwal
  2012-04-03  9:38 ` Johan Hedberg
  0 siblings, 1 reply; 6+ messages in thread
From: Vishal Agarwal @ 2012-04-03  9:19 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: naresh.gupta, Vishal Agarwal

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;
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-04-04  3:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.