diff options
| author | David Lönnhager <david.l@mullvad.net> | 2025-05-21 16:05:12 +0200 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2025-06-02 09:50:38 +0200 |
| commit | 0451de7a20fd98b573e88b81ef858d6edf99c924 (patch) | |
| tree | fa91ec9b09d2c0f841ed5d51e660fa3feea8dac8 | |
| parent | 7df2ef41ed92020898ceb3e684196cb1599f79e4 (diff) | |
| download | mullvadvpn-0451de7a20fd98b573e88b81ef858d6edf99c924.tar.xz mullvadvpn-0451de7a20fd98b573e88b81ef858d6edf99c924.zip | |
Do not overwrite old settings in the early boot blocker
Previously, this could cause settings to be wiped since the migration
code does not run in the early boot blocking code
| -rw-r--r-- | mullvad-daemon/src/early_boot_firewall.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mullvad-daemon/src/early_boot_firewall.rs b/mullvad-daemon/src/early_boot_firewall.rs index 6195c15bb4..6bdfc62cbd 100644 --- a/mullvad-daemon/src/early_boot_firewall.rs +++ b/mullvad-daemon/src/early_boot_firewall.rs @@ -33,6 +33,9 @@ pub async fn initialize_firewall() -> Result<(), Error> { async fn get_allow_lan() -> Result<bool, Error> { let path = mullvad_paths::settings_dir()?; - let settings = SettingsPersister::load(&path).await; + // NOTE: This may fail if the daemon has not been restarted after an upgrade. + // This will cause `allow_lan` to be disabled during early boot. This + // is probably acceptable. + let settings = SettingsPersister::read_only(&path).await; Ok(settings.allow_lan) } |
