Skip to content

Commit e2711e7

Browse files
committed
Try setting mtu on macos with unix implementation
1 parent 460ea57 commit e2711e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

talpid-wireguard/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ mod connectivity_check;
5050
mod logging;
5151
mod ping_monitor;
5252
mod stats;
53-
#[cfg(target_os = "linux")]
53+
#[cfg(any(target_os = "linux", target_os = "macos"))]
5454
mod unix;
5555
#[cfg(wireguard_go)]
5656
mod wireguard_go;
@@ -411,7 +411,7 @@ impl WireguardMonitor {
411411

412412
if verified_mtu != config.mtu {
413413
log::warn!("Lowering MTU from {} to {verified_mtu}", config.mtu);
414-
#[cfg(target_os = "linux")]
414+
#[cfg(any(target_os = "linux", target_os = "macos"))]
415415
let res = unix::set_mtu(&iface_name_clone, verified_mtu);
416416
#[cfg(windows)]
417417
let res = talpid_tunnel::network_interface::set_mtu(

0 commit comments

Comments
 (0)