All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: Auth combination keys should be stored permanently
@ 2012-04-17 11:59 Vishal Agarwal
  2012-04-17 12:33 ` Johan Hedberg
  0 siblings, 1 reply; 4+ messages in thread
From: Vishal Agarwal @ 2012-04-17 11:59 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: vishal.agarwal

If either local or remote device auth type is general bonding
(for ex. if local auth type is 0 but remote auth type is 5) then it
will result in link key of type authenticated link key. Which according
to spec should be stored for future use. So in case of key type
HCI_LK_AUTH_COMBINATION true should be return.

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 c4dc263..e5fcb29 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1250,6 +1250,10 @@ static bool hci_persistent_key(struct hci_dev *hdev, struct hci_conn *conn,
 	if (conn->remote_auth == 0x02 || conn->remote_auth == 0x03)
 		return true;
 
+	/*If Key type is Authenticated combination key then store it*/
+	if (key_type == HCI_LK_AUTH_COMBINATION)
+		return true;
+
 	/* If none of the above criteria match, then don't store the key
 	 * persistently */
 	return false;
-- 
1.7.0.4


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

end of thread, other threads:[~2012-04-17 15:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-17 11:59 [PATCH] Bluetooth: Auth combination keys should be stored permanently Vishal Agarwal
2012-04-17 12:33 ` Johan Hedberg
2012-04-17 14:59   ` vishal agarwal
2012-04-17 15:13     ` Johan Hedberg

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.