[PATCH BlueZ] main: Default device_privacy to true

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

 



From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>

If privacy mode is not strictly set to network set it to device
otherwise network mode would prevent reconnections if the the identity
address is used:

BLUETOOTH CORE SPECIFICATION Version 5.3 | Vol 6, Part B page 2837-2838

 'The Host specifies the privacy mode to be used with each peer
 identity on the resolving list. If it specifies that device privacy
 mode is to be used, then the Controller shall accept both the peer's
 device Identity Address and a resolvable private address generated by
 the peer device using its distributed IRK. Otherwise, network privacy
 mode is used: the Controller shall only accept resolvable private
 addresses generated by the peer device using its distributed IRK.'
---
 src/main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/main.c b/src/main.c
index 34a54d43f..4ee96bc6a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -699,6 +699,7 @@ static void parse_config(GKeyFile *config)
 		DBG("%s", err->message);
 		g_clear_error(&err);
 		btd_opts.privacy = 0x00;
+		btd_opts.device_privacy = true;
 	} else {
 		DBG("privacy=%s", str);
 
@@ -722,6 +723,7 @@ static void parse_config(GKeyFile *config)
 			btd_opts.device_privacy = true;
 		} else if (!strcmp(str, "off")) {
 			btd_opts.privacy = 0x00;
+			btd_opts.device_privacy = true;
 		} else {
 			DBG("Invalid privacy option: %s", str);
 			btd_opts.privacy = 0x00;
-- 
2.35.3




[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