diff options
| author | David Lönnhager <david.l@mullvad.net> | 2022-05-25 16:37:25 +0200 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2022-06-14 12:38:36 +0200 |
| commit | f88987c6380e62740ae45fd2429ace5a83f076e0 (patch) | |
| tree | 3cd9cae2f35a2c0c36e23396013b977703e43228 | |
| parent | 2157f36905400519b6761552c76989dc5631f33e (diff) | |
| download | mullvadvpn-f88987c6380e62740ae45fd2429ace5a83f076e0.tar.xz mullvadvpn-f88987c6380e62740ae45fd2429ace5a83f076e0.zip | |
Recreate tunnel if any relevant setting is modified while connecting
| -rw-r--r-- | mullvad-daemon/src/lib.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mullvad-daemon/src/lib.rs b/mullvad-daemon/src/lib.rs index 9b82470bab..c013361925 100644 --- a/mullvad-daemon/src/lib.rs +++ b/mullvad-daemon/src/lib.rs @@ -1058,7 +1058,7 @@ where } } PrivateDeviceEvent::RotatedKey(_) => { - if let Some(TunnelType::Wireguard) = self.get_target_tunnel_type() { + if self.get_target_tunnel_type() == Some(TunnelType::Wireguard) { self.schedule_reconnect(WG_RECONNECT_DELAY); } } @@ -1688,7 +1688,7 @@ where .set_tunnel_options(&self.settings.tunnel_options); self.event_listener .notify_settings(self.settings.to_settings()); - if let Some(TunnelType::Wireguard) = self.get_connected_tunnel_type() { + if let Some(TunnelType::Wireguard) = self.get_target_tunnel_type() { log::info!("Initiating tunnel restart"); self.reconnect_tunnel(); } @@ -1839,7 +1839,7 @@ where .set_tunnel_options(&self.settings.tunnel_options); self.event_listener .notify_settings(self.settings.to_settings()); - if let Some(TunnelType::OpenVpn) = self.get_connected_tunnel_type() { + if self.get_target_tunnel_type() == Some(TunnelType::OpenVpn) { log::info!( "Initiating tunnel restart because the OpenVPN mssfix setting changed" ); @@ -1976,7 +1976,7 @@ where .set_tunnel_options(&self.settings.tunnel_options); self.event_listener .notify_settings(self.settings.to_settings()); - if self.get_connected_tunnel_type() == Some(TunnelType::Wireguard) { + if self.get_target_tunnel_type() == Some(TunnelType::Wireguard) { log::info!("Reconnecting because the PQ safety setting changed"); self.reconnect_tunnel(); } |
