mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 18:18:55 +00:00
fix(connlib): also read device_uuid for PC systems (#6921)
Addresses the comment here: https://github.com/firezone/firezone/pull/6857#issuecomment-2390457560
This commit is contained in:
@@ -36,9 +36,18 @@ fn device_serial() -> Option<String> {
|
||||
Some(serial)
|
||||
}
|
||||
|
||||
fn device_uuid() -> Option<String> {
|
||||
let data = smbioslib::table_load_from_device().ok()?;
|
||||
|
||||
let uuid = data.find_map(|sys_info: smbioslib::SMBiosSystemInformation| sys_info.uuid());
|
||||
|
||||
uuid?.to_string().into()
|
||||
}
|
||||
|
||||
pub fn device_info() -> phoenix_channel::DeviceInfo {
|
||||
phoenix_channel::DeviceInfo {
|
||||
device_serial: device_serial(),
|
||||
device_uuid: device_uuid(),
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user