Skip to content

Commit e212e1d

Browse files
committed
Update comments
1 parent 45c012f commit e212e1d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

talpid-core/src/tunnel/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ impl TunnelMonitor {
165165
let default_mtu = DEFAULT_MTU;
166166

167167
#[cfg(any(target_os = "linux", target_os = "windows"))]
168-
// Detects the MTU of the device, calculates what the virtual device MTU should be use that
169-
// as the default mtu
168+
// Detects the MTU of the device and sets the default tunnel MTU to that minus headers and
169+
// the safety margin
170170
let default_mtu = args
171171
.runtime
172172
.block_on(
@@ -192,8 +192,8 @@ impl TunnelMonitor {
192192
monitor: InternalTunnelMonitor::Wireguard(monitor),
193193
})
194194
}
195-
/// Calculates the MTU in the tunnel parameters based on the inputted device MTU and some
196-
/// calculations. `peer_mtu` is the detected device MTU.
195+
196+
/// Calculates and appropriate tunnel MTU based on the given peer MTU minus header sizes
197197
#[cfg(any(target_os = "linux", target_os = "windows"))]
198198
fn clamp_mtu(params: &wireguard_types::TunnelParameters, peer_mtu: u16) -> u16 {
199199
// Some users experience fragmentation issues even when we take the interface MTU and

0 commit comments

Comments
 (0)