Skip to content

Commit

Permalink
Update mtu config for win
Browse files Browse the repository at this point in the history
Looks like wintun does support setting mtu in windows.
  • Loading branch information
AstrickHarren committed Sep 18, 2024
1 parent 8483a3d commit abb5b19
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,8 @@ impl Configuration {
}

/// Set the MTU.
///
/// [Note: mtu on the Windows platform is always 65535 due to wintun -- end note]
pub fn mtu(&mut self, value: u16) -> &mut Self {
// mtu on windows platform is always 65535 due to wintun
if cfg!(target_family = "unix") {
self.mtu = Some(value);
}
self.mtu = Some(value);
self
}

Expand Down

0 comments on commit abb5b19

Please sign in to comment.