From af998fd32c34f739002865b7288183e006c2ef53 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 13 Jul 2022 16:40:03 -0700 Subject: [PATCH] main: Default device_privacy to true 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.47.3