File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -165,8 +165,8 @@ impl TunnelMonitor {
165
165
let default_mtu = DEFAULT_MTU ;
166
166
167
167
#[ 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
170
170
let default_mtu = args
171
171
. runtime
172
172
. block_on (
@@ -192,8 +192,8 @@ impl TunnelMonitor {
192
192
monitor : InternalTunnelMonitor :: Wireguard ( monitor) ,
193
193
} )
194
194
}
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
197
197
#[ cfg( any( target_os = "linux" , target_os = "windows" ) ) ]
198
198
fn clamp_mtu ( params : & wireguard_types:: TunnelParameters , peer_mtu : u16 ) -> u16 {
199
199
// Some users experience fragmentation issues even when we take the interface MTU and
You can’t perform that action at this time.
0 commit comments