Do not set MTU if none available or zero.

This commit is contained in:
Jeroen Leenarts 2018-08-13 13:46:56 +02:00
parent 7e2e65f160
commit ec4bc66094
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
let dnsSettings = NEDNSSettings(servers: splitDnsEntries)
newSettings.dnsSettings = dnsSettings
}
if let mtu = mtu {
if let mtu = mtu, mtu.intValue > 0 {
newSettings.mtu = mtu
}