* [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
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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox