summaryrefslogtreecommitdiffhomepage
path: root/talpid-core/src
diff options
context:
space:
mode:
authorEmīls <emils@mullvad.net>2022-05-09 20:40:01 +0100
committerEmīls <emils@mullvad.net>2022-05-10 12:18:51 +0100
commit779efb3225dac10fa351db4df8576d5175cdb11e (patch)
tree66f4021d73b1bdc597cf856c585d80b1357ae061 /talpid-core/src
parentcb35b057d7be493f7fe144dccc67c6838c1955e6 (diff)
downloadmullvadvpn-779efb3225dac10fa351db4df8576d5175cdb11e.tar.xz
mullvadvpn-779efb3225dac10fa351db4df8576d5175cdb11e.zip
Lower default MTU to 1280 on Android
Diffstat (limited to 'talpid-core/src')
-rw-r--r--talpid-core/src/tunnel/wireguard/config.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/talpid-core/src/tunnel/wireguard/config.rs b/talpid-core/src/tunnel/wireguard/config.rs
index 7566d5c141..026c6c9fae 100644
--- a/talpid-core/src/tunnel/wireguard/config.rs
+++ b/talpid-core/src/tunnel/wireguard/config.rs
@@ -30,8 +30,14 @@ pub struct Config {
pub obfuscator_config: Option<ObfuscatorConfig>,
}
+#[cfg(not(target_os = "android"))]
const DEFAULT_MTU: u16 = 1380;
+/// Set the MTU to the lowest possible whilst still allowing for IPv6 to help with wireless
+/// carriers that do a lot of encapsulation.
+#[cfg(target_os = "android")]
+const DEFAULT_MTU: u16 = 1280;
+
/// Configuration errors
#[derive(err_derive::Error, Debug)]
pub enum Error {