Do not set MTU if none available or zero.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jeroen Leenarts 2018-08-13 13:46:56 +02:00
parent 76a001dbe0
commit 6d18b6cccb
1 changed files with 1 additions and 1 deletions

View File

@ -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
} }