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-05-22 15:42:58 +0200 |
| commit | 1af52f2f71ca1bd92f59b4ddebe620ae20678037 (patch) | |
| tree | fff79763fe8c3b6181b8801289df57ed382b8c62 /mullvad-daemon/src | |
| parent | aaf81fdbc1675ee1cad5123e5617f6735d7dfe2b (diff) | |
| download | mullvadvpn-1af52f2f71ca1bd92f59b4ddebe620ae20678037.tar.xz mullvadvpn-1af52f2f71ca1bd92f59b4ddebe620ae20678037.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
Diffstat (limited to 'mullvad-daemon/src')
| -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) } |
