Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 35d4adcc authored by Hemant Gupta's avatar Hemant Gupta Committed by Gustavo Padovan
Browse files

Bluetooth: Don't distribute keys in case of Encryption Failure



SMP Keys should only be distributeed when encryption is successful.

Signed-off-by: default avatarHemant Gupta <hemant.gupta@stericsson.com>
Signed-off-by: default avatarGustavo Padovan <gustavo@padovan.org>
parent f4001d28
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -4813,6 +4813,7 @@ int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt)
	BT_DBG("conn %p", conn);

	if (hcon->type == LE_LINK) {
		if (!status && encrypt)
			smp_distribute_keys(conn, 0);
		cancel_delayed_work(&conn->security_timer);
	}