All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] Bluetooth: Don't distribute keys in case of Encryption Failure
@ 2012-04-18  9:16 Hemant Gupta
  2012-04-19 14:16 ` Gustavo Padovan
  0 siblings, 1 reply; 2+ messages in thread
From: Hemant Gupta @ 2012-04-18  9:16 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Hemant Gupta

SMP Keys should only be distributeed when encryption is successful.

Signed-off-by: Hemant Gupta <hemant.gupta@stericsson.com>
---
 net/bluetooth/l2cap_core.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 20dbebb..c33d714 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -4813,7 +4813,8 @@ int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt)
 	BT_DBG("conn %p", conn);
 
 	if (hcon->type == LE_LINK) {
-		smp_distribute_keys(conn, 0);
+		if (!status && encrypt)
+			smp_distribute_keys(conn, 0);
 		cancel_delayed_work(&conn->security_timer);
 	}
 
-- 
1.7.0.4


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

* Re: [PATCH v1] Bluetooth: Don't distribute keys in case of Encryption Failure
  2012-04-18  9:16 [PATCH v1] Bluetooth: Don't distribute keys in case of Encryption Failure Hemant Gupta
@ 2012-04-19 14:16 ` Gustavo Padovan
  0 siblings, 0 replies; 2+ messages in thread
From: Gustavo Padovan @ 2012-04-19 14:16 UTC (permalink / raw)
  To: Hemant Gupta; +Cc: linux-bluetooth

Hi Hemant,

* Hemant Gupta <hemant.gupta@stericsson.com> [2012-04-18 14:46:26 +0530]:

> SMP Keys should only be distributeed when encryption is successful.
> 
> Signed-off-by: Hemant Gupta <hemant.gupta@stericsson.com>
> ---
>  net/bluetooth/l2cap_core.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)

Patch has been applied to bluetooth-next. Thanks.

	Gustavo

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

end of thread, other threads:[~2012-04-19 14:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-18  9:16 [PATCH v1] Bluetooth: Don't distribute keys in case of Encryption Failure Hemant Gupta
2012-04-19 14:16 ` Gustavo Padovan

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.