diff --git a/Cargo.toml b/Cargo.toml index 4f3788e9..418c23e0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tun2" -version = "0.7.21" +version = "0.7.22" edition = "2021" authors = ["meh. ", "@ssrlive"] diff --git a/src/configuration.rs b/src/configuration.rs index 34a30684..d6f99306 100644 --- a/src/configuration.rs +++ b/src/configuration.rs @@ -92,7 +92,10 @@ impl Configuration { /// Set the MTU. pub fn mtu(&mut self, value: i32) -> &mut Self { - self.mtu = Some(value); + // mtu on windows platform is always 65535 due to wintun + if cfg!(target_family = "unix") { + self.mtu = Some(value); + } self }