File tree 1 file changed +9
-7
lines changed
1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,14 @@ use talpid_wireguard;
17
17
const OPENVPN_LOG_FILENAME : & str = "openvpn.log" ;
18
18
const WIREGUARD_LOG_FILENAME : & str = "wireguard.log" ;
19
19
20
+ /// Set the MTU to the lowest possible whilst still allowing for IPv6 to help with wireless
21
+ /// carriers that do a lot of encapsulation.
22
+ const DEFAULT_MTU : u16 = if cfg ! ( target_os = "android" ) {
23
+ 1280
24
+ } else {
25
+ 1380
26
+ } ;
27
+
20
28
/// Results from operations in the tunnel module.
21
29
pub type Result < T > = std:: result:: Result < T , Error > ;
22
30
@@ -137,13 +145,7 @@ impl TunnelMonitor {
137
145
+ Clone
138
146
+ ' static ,
139
147
{
140
- let default_mtu = if cfg ! ( target_os = "android" ) {
141
- // Set the MTU to the lowest possible whilst still allowing for IPv6 to help
142
- // with wireless carriers that do a lot of encapsulation.
143
- 1280
144
- } else {
145
- 1380
146
- } ;
148
+ let default_mtu = DEFAULT_MTU ;
147
149
148
150
#[ cfg( any( target_os = "linux" , target_os = "windows" ) ) ]
149
151
// Detects the MTU of the device, calculates what the virtual device MTU should be use that
You can’t perform that action at this time.
0 commit comments