* [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
* Re: [PATCH] Don't handle Changed Combination Link Key for a temporary keys.
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
0 siblings, 1 reply; 3+ messages in thread
From: Johan Hedberg @ 2010-06-16 10:25 UTC (permalink / raw)
To: Waldemar.Rymarkiewicz; +Cc: linux-bluetooth, par-gunnar.p.hjalmdahl
Hi,
On Wed, Jun 16, 2010, Waldemar.Rymarkiewicz@tieto.com 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] Don't handle Changed Combination Link Key for a temporary keys.
2010-06-16 10:25 ` Johan Hedberg
@ 2010-06-16 10:39 ` Waldemar.Rymarkiewicz
0 siblings, 0 replies; 3+ messages in thread
From: Waldemar.Rymarkiewicz @ 2010-06-16 10:39 UTC (permalink / raw)
To: johan.hedberg; +Cc: linux-bluetooth, par-gunnar.p.hjalmdahl
Yes. That's exactly this situation.
Thanks,
/Waldek
-----Original Message-----
From: Johan Hedberg [mailto:johan.hedberg@gmail.com]
Sent: Wednesday, June 16, 2010 12:26 PM
To: Rymarkiewicz Waldemar
Cc: linux-bluetooth@vger.kernel.org; par-gunnar.p.hjalmdahl@stericsson.com
Subject: Re: [PATCH] Don't handle Changed Combination Link Key for a temporary keys.
Hi,
On Wed, Jun 16, 2010, Waldemar.Rymarkiewicz@tieto.com 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
^ permalink raw reply [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