diff --git a/talpid-core/src/split_tunnel/macos/tun.rs b/talpid-core/src/split_tunnel/macos/tun.rs index 25412c801ced..c74ae5cb07e7 100644 --- a/talpid-core/src/split_tunnel/macos/tun.rs +++ b/talpid-core/src/split_tunnel/macos/tun.rs @@ -818,10 +818,12 @@ fn capture_outbound_packets( .open() .map_err(Error::CaptureSplitTunnelDevice)?; - // TODO: This is unsupported on macOS 13 and lower, so we determine the direction using the - // pktap header flags. Once macOS 13 is no longer supported, this can be uncommented. - // cap.direction(pcap::Direction::Out) - // .map_err(Error::SetDirection)?; + // TODO: `Capture::direction` is unsupported on macOS 13 and lower, so we determine the + // direction using the pktap header as well. Once macOS 13 is no longer supported, + // this can be assumed to work. Filtering here appears to be a lot faster. + if let Err(error) = cap.direction(pcap::Direction::Out) { + log::debug!("Failed to set capture direction. Might be on macOS 13: {error}"); + } let cap = cap.setnonblock().map_err(Error::EnableNonblock)?; let stream = cap