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
Yes. That's exactly this situation.
Thanks,
/Waldek
-----Original Message-----
From: Johan Hedberg [mailto:[email protected]]
Sent: Wednesday, June 16, 2010 12:26 PM
To: Rymarkiewicz Waldemar
Cc: [email protected]; [email protected]
Subject: Re: [PATCH] Don't handle Changed Combination Link Key for a temporary keys.
Hi,
On Wed, Jun 16, 2010, [email protected] wrote:
> 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(-)
Thanks for the patch. It has been pushed upstream. In the future please fix your git author name since it was set to your email address (I fixed it manually this time).
Just to get this clear, this takes care of the situation where we had a link key with a "No Bonding" requirement and get a renewed key for the connection in which case we should still honor the no bonding requirement by not storing the renewed key, right? That's the only other type of "temporary" link key that I can think of in addition to debug keys (which we already take care of).
Johan
Hi,
On Wed, Jun 16, 2010, [email protected] wrote:
> 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(-)
Thanks for the patch. It has been pushed upstream. In the future please
fix your git author name since it was set to your email address (I fixed
it manually this time).
Just to get this clear, this takes care of the situation where we had a
link key with a "No Bonding" requirement and get a renewed key for the
connection in which case we should still honor the no bonding
requirement by not storing the renewed key, right? That's the only other
type of "temporary" link key that I can think of in addition to debug
keys (which we already take care of).
Johan