[PATCH 1/2] android/bluetooth: Clear CSRK information after unpair

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



CSRK information should be removed when unpaired.
---
 android/bluetooth.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/android/bluetooth.c b/android/bluetooth.c
index bc10b38..092bdd7 100644
--- a/android/bluetooth.c
+++ b/android/bluetooth.c
@@ -796,6 +796,12 @@ static void update_le_state(struct device *dev, bool pairing, bool paired,
 	} else if (!paired && !dev->bredr_paired) {
 		bonded_devices = g_slist_remove(bonded_devices, dev);
 		remove_device_info(dev, DEVICES_FILE);
+		dev->valid_local_csrk = false;
+		dev->valid_remote_csrk = false;
+		dev->local_sign_cnt = 0;
+		dev->remote_sign_cnt = 0;
+		memset(dev->local_csrk, 0, sizeof(dev->local_csrk));
+		memset(dev->remote_csrk, 0, sizeof(dev->remote_csrk));
 		cache_device(dev);
 	}
 
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux