Do not set MTU if none available or zero.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
76a001dbe0
commit
6d18b6cccb
|
@ -53,7 +53,7 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
|
||||||
let dnsSettings = NEDNSSettings(servers: splitDnsEntries)
|
let dnsSettings = NEDNSSettings(servers: splitDnsEntries)
|
||||||
newSettings.dnsSettings = dnsSettings
|
newSettings.dnsSettings = dnsSettings
|
||||||
}
|
}
|
||||||
if let mtu = mtu {
|
if let mtu = mtu, mtu.intValue > 0 {
|
||||||
newSettings.mtu = mtu
|
newSettings.mtu = mtu
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue