Skip to contentSkip to conversation

mesh: Add provisioning algorithms config

PATCH In review Junho Lee 2 participants 2 messages Aug 28, 2024 Bluetooth drivers

lore
Share & tools
lore

Junho Lee

author
#0 lore raw

PATCH v2 1/2 mesh: Add provisioning algorithms config

This added the Algorithms config to the conf file because there was a TODO comment waiting to be added to the config file, and it was a mutable config.

---

v2: Split commits because the previous commit appears to have changed two issues at once

 mesh/mesh-main.conf | 5 +++++
 mesh/mesh.c         | 5 ++++-
 2 files changed, 9 insertions(+), 1 deletion(-)
mesh/mesh-main.conf +5 -0
index aca9e6fa5..72154493e 100644
@@ -41,3 +41,8 @@
 # Setting this value to zero means there's no timeout.
 # Defaults to 60.
 #ProvTimeout = 60
+
+# Bitmask of supported provisioning security algorithms.
+# Valid range: 0-65535
+# Defaults to 1.
+#Algorithms = 1
mesh/mesh.c +4 -1
index 91cf25175..7b670e40a 100644
@@ -245,6 +245,10 @@ static void parse_settings(const char *mesh_conf_fname)
 	if (l_settings_get_uint(settings, "General", "ProvTimeout", &value))
 		mesh.prov_timeout = value;
 
+	if (l_settings_get_uint(settings, "General", "Algorithms", &value) &&
+								value <= 65535)
+		mesh.algorithms = value;
+
 done:
 	l_settings_free(settings);
 }
@@ -262,7 +266,6 @@ bool mesh_init(const char *config_dir, const char *mesh_conf_fname,
 	mesh_model_init();
 	mesh_agent_init();
 
-	/* TODO: read mesh.conf */
 	mesh.prov_timeout = DEFAULT_PROV_TIMEOUT;
 	mesh.algorithms = DEFAULT_ALGORITHMS;
 
Signature · 1 line
2.34.1
#1 lore raw

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=884146

---Test result---

Test Summary:

CheckPatch                    PASS      0.84 seconds
GitLint                       PASS      0.61 seconds
BuildEll                      PASS      24.73 seconds
BluezMake                     PASS      1669.32 seconds
MakeCheck                     PASS      13.41 seconds
MakeDistcheck                 PASS      176.62 seconds
CheckValgrind                 PASS      251.76 seconds
CheckSmatch                   PASS      355.73 seconds
bluezmakeextell               PASS      120.32 seconds
IncrementalBuild              PASS      2976.71 seconds
ScanBuild                     PASS      1104.88 seconds

---
Regards,
Linux Bluetooth