summaryrefslogtreecommitdiffhomepage
path: root/talpid-core/src
diff options
context:
space:
mode:
authorEmīls <emils@mullvad.net>2022-04-28 14:22:44 +0100
committerEmīls <emils@mullvad.net>2022-04-28 14:41:55 +0100
commit335c727053333d13944589d8f4c97489dffcc415 (patch)
tree77c48c56bfec68f91a0015e879246d53df42f69d /talpid-core/src
parent1a14f5c4c4f3818cea75bbb592d74d09b573aede (diff)
downloadmullvadvpn-335c727053333d13944589d8f4c97489dffcc415.tar.xz
mullvadvpn-335c727053333d13944589d8f4c97489dffcc415.zip
Send one ICMP packet when connecting
Diffstat (limited to 'talpid-core/src')
-rw-r--r--talpid-core/src/tunnel/wireguard/connectivity_check.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/talpid-core/src/tunnel/wireguard/connectivity_check.rs b/talpid-core/src/tunnel/wireguard/connectivity_check.rs
index d6bb61a5fc..ec2af873a0 100644
--- a/talpid-core/src/tunnel/wireguard/connectivity_check.rs
+++ b/talpid-core/src/tunnel/wireguard/connectivity_check.rs
@@ -107,6 +107,8 @@ impl ConnectivityMonitor {
// checks if the tunnel has ever worked. Intended to check if a connection to a tunnel is
// successfull at the start of a connection.
pub(super) fn establish_connectivity(&mut self, retry_attempt: u32) -> Result<bool, Error> {
+ // Send initial ping to prod WireGuard into connecting.
+ self.pinger.send_icmp().map_err(Error::PingError)?;
self.establish_connectivity_inner(
retry_attempt,
ESTABLISH_TIMEOUT,