diff options
| author | David Göransson <david.goransson@mullvad.net> | 2025-01-13 11:51:09 +0100 |
|---|---|---|
| committer | David Göransson <david.goransson@mullvad.net> | 2025-02-06 11:02:59 +0100 |
| commit | 341c10ba38752bc36151b8998064e706f70d9ea6 (patch) | |
| tree | afb60c53e267eda0b033f346b64afd9035d7495a /talpid-core/src | |
| parent | 612aad8d8d2ae779a4e5e01e85b2848b4fc7de3c (diff) | |
| download | mullvadvpn-341c10ba38752bc36151b8998064e706f70d9ea6.tar.xz mullvadvpn-341c10ba38752bc36151b8998064e706f70d9ea6.zip | |
Replace old waitForTunnelUp function
After invoking VpnService.establish() we will get a tunnel file
descriptor that corresponds to the interface that was created. However,
this has no guarantee of the routing table beeing up to date, and we
might thus send traffic outside the tunnel. Previously this was done
through looking at the tunFd to see that traffic is sent to verify that
the routing table has changed. If no traffic is seen some traffic is
induced to a random IP address to ensure traffic can be seen. This new
implementation is slower but won't risk sending UDP traffic to a random
public address at the internet.
Diffstat (limited to 'talpid-core/src')
| -rw-r--r-- | talpid-core/src/connectivity_listener.rs | 1 | ||||
| -rw-r--r-- | talpid-core/src/tunnel_state_machine/connecting_state.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/talpid-core/src/connectivity_listener.rs b/talpid-core/src/connectivity_listener.rs index 9bdf4bf87a..033d918e16 100644 --- a/talpid-core/src/connectivity_listener.rs +++ b/talpid-core/src/connectivity_listener.rs @@ -47,6 +47,7 @@ pub struct ConnectivityListener { android_listener: GlobalRef, } +// Clean this up static CONNECTIVITY_TX: Mutex<Option<UnboundedSender<Connectivity>>> = Mutex::new(None); impl ConnectivityListener { diff --git a/talpid-core/src/tunnel_state_machine/connecting_state.rs b/talpid-core/src/tunnel_state_machine/connecting_state.rs index 7c7637cd20..9060787536 100644 --- a/talpid-core/src/tunnel_state_machine/connecting_state.rs +++ b/talpid-core/src/tunnel_state_machine/connecting_state.rs @@ -138,6 +138,7 @@ impl ConnectingState { &shared_values.route_manager, retry_attempt, ); + let params = connecting_state.tunnel_parameters.clone(); ( Box::new(connecting_state), |
