diff mbox series

[BlueZ,3/4] test/test-mesh: Generate correct value for Device UUID

Message ID 20210211222143.39986-4-inga.stotland@intel.com
State New
Headers show
Series Use compliant UUID for mesh | expand

Commit Message

Inga Stotland Feb. 11, 2021, 10:21 p.m. UTC
This ensures that the value of Device UUID when invoking
Join method is compliant with RFC 4122.
---
 test/test-mesh | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/test/test-mesh b/test/test-mesh
index 9e4783734..a478843a3 100755
--- a/test/test-mesh
+++ b/test/test-mesh
@@ -889,6 +889,11 @@  class MainMenu(Menu):
 
 		uuid = bytearray.fromhex("0a0102030405060708090A0B0C0D0E0F")
 		random.shuffle(uuid)
+		uuid[6] &= 0x0f;
+		uuid[6] |= 4 << 4;
+		uuid[8] &= 0x3f;
+		uuid[8] |= 0x80;
+
 		uuid_str = array_to_string(uuid)
 
 		print(set_yellow('Joining with UUID ') + set_green(uuid_str))