summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2021-11-01 15:01:04 -0700
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2021-11-01 21:37:23 -0700
commit7234c7394e781dce2d9324c439ecbad988102259 (patch)
tree156ea6ce47ade7a916678caab5a9cb7840b80008 /src/main.c
parent28e85e549d75c2204bdf35a94749c8d2130de151 (diff)
downloadbluez-7234c7394e781dce2d9324c439ecbad988102259.tar.gz
main.conf: Fix Privacy modes
Device privacy 0x01 uses RPA regardless of the discoverable setting thus it conforms to network mode not device mode. Also this improves documentation to state what is the expectation of each mode since it may not have been very clear by just using the terms from the spec.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 5ca8d5644..2835c81b2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -666,8 +666,10 @@ static void parse_config(GKeyFile *config)
} else {
DBG("privacy=%s", str);
- if (!strcmp(str, "device"))
+ if (!strcmp(str, "network") || !strcmp(str, "on"))
btd_opts.privacy = 0x01;
+ if (!strcmp(str, "device") || !strcmp(str, "limited"))
+ btd_opts.privacy = 0x02;
else if (!strcmp(str, "off"))
btd_opts.privacy = 0x00;
else {