diff options
| author | David Lönnhager <david.l@mullvad.net> | 2025-05-21 18:43:12 +0200 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2025-05-22 12:51:31 +0200 |
| commit | f66e9b92cb75e0342cd3757efc3de7ef6d7e1b9f (patch) | |
| tree | 37f7a00d50be9184ac5059f34b3c7144b8c0d83b /talpid-core/src | |
| parent | ef5e2ee5f694bd687db0b94ad67c14c53f287c31 (diff) | |
| download | mullvadvpn-f66e9b92cb75e0342cd3757efc3de7ef6d7e1b9f.tar.xz mullvadvpn-f66e9b92cb75e0342cd3757efc3de7ef6d7e1b9f.zip | |
Reconnect when unavailable IP version becomes available
Diffstat (limited to 'talpid-core/src')
| -rw-r--r-- | talpid-core/src/tunnel_state_machine/error_state.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/talpid-core/src/tunnel_state_machine/error_state.rs b/talpid-core/src/tunnel_state_machine/error_state.rs index ca280b9584..8ee25c764a 100644 --- a/talpid-core/src/tunnel_state_machine/error_state.rs +++ b/talpid-core/src/tunnel_state_machine/error_state.rs @@ -10,7 +10,7 @@ use crate::firewall::FirewallPolicy; use crate::resolver::LOCAL_DNS_RESOLVER; use futures::StreamExt; use talpid_types::{ - tunnel::{ErrorStateCause, FirewallPolicyError}, + tunnel::{ErrorStateCause, FirewallPolicyError, ParameterGenerationError}, ErrorExt, }; @@ -185,7 +185,10 @@ impl TunnelState for ErrorState { Some(TunnelCommand::Connectivity(connectivity)) => { shared_values.connectivity = connectivity; if !connectivity.is_offline() - && matches!(self.block_reason, ErrorStateCause::IsOffline) + // Reconnect if we're no longer offline + && (matches!(self.block_reason, ErrorStateCause::IsOffline) + // Try to reconnect if missing IP connectivity becomes available + || matches!(self.block_reason, ErrorStateCause::TunnelParameterError(ParameterGenerationError::IpVersionUnavailable { family }) if connectivity.has_family(family))) { #[cfg(target_os = "macos")] if !*LOCAL_DNS_RESOLVER { |
