Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] Don't handle Changed Combination Link Key for a temporary keys.
@ 2010-06-16  8:53 Waldemar.Rymarkiewicz
  2010-06-16 10:25 ` Johan Hedberg
  0 siblings, 1 reply; 3+ messages in thread
From: Waldemar.Rymarkiewicz @ 2010-06-16  8:53 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: par-gunnar.p.hjalmdahl

Patch on behalf of ST-Ericsson SA

This patch prevents from storing Changed Combination Link Key type
for temporary keys.  Getting Changed Combination Link Key remote
auth requirements are already set to 0xff (bonding has finished)
and that lets the system to store the key type of Changed
Combination (0x06). For temporary keys we don't have to care about
Change Link Key event.
---
 src/dbus-hci.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/dbus-hci.c b/src/dbus-hci.c
index 19748a7..a3fd557 100644
--- a/src/dbus-hci.c
+++ b/src/dbus-hci.c
@@ -681,12 +681,19 @@ int hcid_dbus_link_key_notify(bdaddr_t *local, bdaddr_t *peer,
 			old_key_type = 0x03;
 		if (old_key_type != 0xff)
 			new_key_type = old_key_type;
+		else
+			/* This is Changed Combination Link Key for
+			 * a temporary link key.*/
+			return 0;
 	}
 
 	get_auth_requirements(local, peer, &local_auth);
 	remote_auth = device_get_auth(device);
 	bonding = device_is_bonding(device, NULL);
 
+	DBG("key type 0x%02x old key type 0x%02x new key type 0x%02x",
+					key_type, old_key_type, new_key_type);
+
 	DBG("local auth 0x%02x and remote auth 0x%02x",
 					local_auth, remote_auth);
 
-- 
1.7.0.4
 

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

end of thread, other threads:[~2010-06-16 10:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-16  8:53 [PATCH] Don't handle Changed Combination Link Key for a temporary keys Waldemar.Rymarkiewicz
2010-06-16 10:25 ` Johan Hedberg
2010-06-16 10:39   ` Waldemar.Rymarkiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox