Make sure MTU is positive

This commit is contained in:
Davide De Rosa 2022-03-26 17:08:45 +01:00
parent bbdc21fd61
commit 4bfa0b4e74
1 changed files with 1 additions and 1 deletions

View File

@ -794,7 +794,7 @@ extension OpenVPNTunnelProvider: OpenVPNSessionDelegate {
newSettings.ipv6Settings = ipv6Settings newSettings.ipv6Settings = ipv6Settings
newSettings.dnsSettings = dnsSettings newSettings.dnsSettings = dnsSettings
newSettings.proxySettings = proxySettings newSettings.proxySettings = proxySettings
if let mtu = cfg.configuration.mtu { if let mtu = cfg.configuration.mtu, mtu > 0 {
newSettings.mtu = NSNumber(value: mtu) newSettings.mtu = NSNumber(value: mtu)
} }