diff mbox series

[BlueZ] mesh: Add provisioning algorithms config

Message ID 66ceb660.050a0220.214e3f.28fa@mx.google.com (mailing list archive)
State Superseded
Headers show
Series [BlueZ] mesh: Add provisioning algorithms config | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint success Gitlint PASS
tedd_an/BuildEll success Build ELL PASS
tedd_an/BluezMake success Bluez Make PASS
tedd_an/MakeCheck success Bluez Make Check PASS
tedd_an/MakeDistcheck success Make Distcheck PASS
tedd_an/CheckValgrind success Check Valgrind PASS
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/bluezmakeextell success Make External ELL PASS
tedd_an/IncrementalBuild success Incremental Build PASS
tedd_an/ScanBuild success Scan Build PASS

Commit Message

Junho Lee Aug. 28, 2024, 5:32 a.m. UTC
I 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.
I also removed the duplicate initialization code for Provisioning
Timeout and Algorithms.

Signed-off-by: Junho Lee <tot0roprog@gmail.com>
---
 mesh/mesh-main.conf | 5 +++++
 mesh/mesh.c         | 8 ++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

Comments

bluez.test.bot@gmail.com Aug. 28, 2024, 7:01 a.m. UTC | #1
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=884079

---Test result---

Test Summary:
CheckPatch                    PASS      0.36 seconds
GitLint                       PASS      0.25 seconds
BuildEll                      PASS      27.14 seconds
BluezMake                     PASS      1626.17 seconds
MakeCheck                     PASS      13.70 seconds
MakeDistcheck                 PASS      176.40 seconds
CheckValgrind                 PASS      251.86 seconds
CheckSmatch                   PASS      357.54 seconds
bluezmakeextell               PASS      119.80 seconds
IncrementalBuild              PASS      1399.35 seconds
ScanBuild                     PASS      998.01 seconds



---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/mesh/mesh-main.conf b/mesh/mesh-main.conf
index aca9e6fa5..72154493e 100644
--- a/mesh/mesh-main.conf
+++ b/mesh/mesh-main.conf
@@ -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
diff --git a/mesh/mesh.c b/mesh/mesh.c
index 91cf25175..49d252e5e 100644
--- a/mesh/mesh.c
+++ b/mesh/mesh.c
@@ -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,10 +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;
-
 	storage_dir = config_dir ? config_dir : MESH_STORAGEDIR;
 
 	l_info("Loading node configuration from %s", storage_dir);