op-packages/rustdesk-server/patches/005-fix-config-mac-fallback.patch
github-actions[bot] 40792d98e2 🍕 Sync 2026-06-10 14:14:07
2026-06-10 14:14:07 +08:00

17 lines
525 B
Diff

--- a/libs/hbb_common/src/config.rs
+++ b/libs/hbb_common/src/config.rs
@@ -797,7 +797,12 @@ impl Config {
id &= 0x1FFFFFFF;
Some(id.to_string())
} else {
- None
+ log::warn!("Failed to get MAC address. Fallback to random ID");
+ Some(
+ rand::thread_rng()
+ .gen_range(1_000_000_000..2_000_000_000)
+ .to_string(),
+ )
}
}
}