summaryrefslogtreecommitdiffhomepage
path: root/talpid-wireguard/src
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2024-10-17 12:58:24 +0200
committerLinus Färnstrand <linus@mullvad.net>2024-10-17 14:13:52 +0200
commit9ef1ed0f0bce65177d1e72041179f849cd6bcbf0 (patch)
tree34ec1bfd8a691acfd38ffa20d7b738a8a2f86f80 /talpid-wireguard/src
parent7c40bce181c1857b749b88d61ce9999440d7379f (diff)
downloadmullvadvpn-9ef1ed0f0bce65177d1e72041179f849cd6bcbf0.tar.xz
mullvadvpn-9ef1ed0f0bce65177d1e72041179f849cd6bcbf0.zip
Document relationship between ephemeral peer MTU fixes
Diffstat (limited to 'talpid-wireguard/src')
-rw-r--r--talpid-wireguard/src/ephemeral.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/talpid-wireguard/src/ephemeral.rs b/talpid-wireguard/src/ephemeral.rs
index b00babf781..5440a142f6 100644
--- a/talpid-wireguard/src/ephemeral.rs
+++ b/talpid-wireguard/src/ephemeral.rs
@@ -34,6 +34,9 @@ pub async fn config_ephemeral_peers(
tunnel.get_interface_name()
};
+ // Lower the MTU in order to make the ephemeral peer handshake work more reliably.
+ // On unix based operating systems this is done by setting the MSS directly on the
+ // TCP socket. But that solution does not work on Windows, so we do this MTU hack instead.
log::trace!("Temporarily lowering tunnel MTU before ephemeral peer config");
try_set_ipv4_mtu(&iface_name, talpid_tunnel::MIN_IPV4_MTU);