diff options
| author | David Lönnhager <david.l@mullvad.net> | 2022-07-18 10:59:40 +0200 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2022-07-18 10:59:40 +0200 |
| commit | 8991cb183e5763aa9261765f8034ce19383c77fc (patch) | |
| tree | 58fbeeaac96257f95f575ca4883a39310f20530b | |
| parent | 783a1c95bbb2d973df5e3b0b31e2258ae45853fc (diff) | |
| parent | 08a9b90e81bf6133f8b9877e73ddae0280bb9ef0 (diff) | |
| download | mullvadvpn-8991cb183e5763aa9261765f8034ce19383c77fc.tar.xz mullvadvpn-8991cb183e5763aa9261765f8034ce19383c77fc.zip | |
Merge branch 'fix-non-atomic-shutdown'
| -rw-r--r-- | CHANGELOG.md | 6 | ||||
| -rw-r--r-- | mullvad-daemon/src/lib.rs | 14 |
2 files changed, 13 insertions, 7 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 309ba1b676..0597ca1b60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ Line wrap the file at 100 chars. Th #### Android - Add device management to the Android app. This simplifies knowing which device is which and adds the option to log other devices out when the account already has five devices. + #### Windows - Windows daemon now looks up the MTU on the default interface and uses this MTU instead of the default 1500. The 1500 is still the fallback if this for some reason fails. This may stop @@ -65,6 +66,11 @@ Line wrap the file at 100 chars. Th - Prevent location request responses from being received outside the tunnel when in the connected state. +#### Windows +- Fix potential leak window when stopping the service and auto-connect is enabled and always require + VPN is disabled. When stopped, usually due to a reboot, the daemon would disconnect before + entering a blocking state. + ## [2022.3-beta2] - 2022-06-29 ### Fixed diff --git a/mullvad-daemon/src/lib.rs b/mullvad-daemon/src/lib.rs index c6f024eb49..2a7799b15c 100644 --- a/mullvad-daemon/src/lib.rs +++ b/mullvad-daemon/src/lib.rs @@ -758,13 +758,6 @@ where } } - // If auto-connect is enabled, block all traffic before shutting down to ensure - // that no traffic can leak during boot. - #[cfg(windows)] - if self.settings.auto_connect { - self.send_tunnel_command(TunnelCommand::BlockWhenDisconnected(true)); - } - self.finalize().await; Ok(()) } @@ -2144,6 +2137,13 @@ where } fn trigger_shutdown_event(&mut self) { + // If auto-connect is enabled, block all traffic before shutting down to ensure + // that no traffic can leak during boot. + #[cfg(windows)] + if self.settings.auto_connect { + self.send_tunnel_command(TunnelCommand::BlockWhenDisconnected(true)); + } + self.state.shutdown(&self.tunnel_state); self.disconnect_tunnel(); } |
