File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -164,9 +164,9 @@ impl TunnelMonitor {
164
164
{
165
165
let default_mtu = DEFAULT_MTU ;
166
166
167
- #[ cfg( any( target_os = "linux" , target_os = "windows" ) ) ]
168
167
// Detects the MTU of the device and sets the default tunnel MTU to that minus headers and
169
168
// the safety margin
169
+ #[ cfg( any( target_os = "linux" , target_os = "windows" ) ) ]
170
170
let default_mtu = args
171
171
. runtime
172
172
. block_on (
@@ -176,14 +176,14 @@ impl TunnelMonitor {
176
176
. map ( |mtu| Self :: clamp_mtu ( params, mtu) )
177
177
. unwrap_or ( default_mtu) ;
178
178
179
- #[ cfg( any ( target_os = "linux" , windows ) ) ]
179
+ #[ cfg( not ( target_os = "android" ) ) ]
180
180
let detect_mtu = params. options . mtu . is_none ( ) ;
181
181
182
182
let config = talpid_wireguard:: config:: Config :: from_parameters ( params, default_mtu) ?;
183
183
let monitor = talpid_wireguard:: WireguardMonitor :: start (
184
184
config,
185
185
params. options . quantum_resistant ,
186
- #[ cfg( any ( target_os = "linux" , windows ) ) ]
186
+ #[ cfg( not ( target_os = "android" ) ) ]
187
187
detect_mtu,
188
188
log. as_deref ( ) ,
189
189
args,
Original file line number Diff line number Diff line change @@ -269,7 +269,7 @@ impl WireguardMonitor {
269
269
> (
270
270
mut config : Config ,
271
271
psk_negotiation : bool ,
272
- #[ cfg( any ( target_os = "linux" , windows ) ) ] detect_mtu : bool ,
272
+ #[ cfg( not ( target_os = "android" ) ) ] detect_mtu : bool ,
273
273
log_path : Option < & Path > ,
274
274
args : TunnelArgs < ' _ , F > ,
275
275
) -> Result < WireguardMonitor > {
@@ -389,7 +389,7 @@ impl WireguardMonitor {
389
389
. await ?;
390
390
}
391
391
392
- #[ cfg( any ( target_os = "linux" , windows ) ) ]
392
+ #[ cfg( not ( target_os = "android" ) ) ]
393
393
if detect_mtu {
394
394
let iface_name_clone = iface_name. clone ( ) ;
395
395
tokio:: task:: spawn ( async move {
You can’t perform that action at this time.
0 commit comments