From 4bfa0b4e7408f43de8e433d87d6b79dcad4e6aeb Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Sat, 26 Mar 2022 17:08:45 +0100 Subject: [PATCH] Make sure MTU is positive --- .../TunnelKitOpenVPNAppExtension/OpenVPNTunnelProvider.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/TunnelKitOpenVPNAppExtension/OpenVPNTunnelProvider.swift b/Sources/TunnelKitOpenVPNAppExtension/OpenVPNTunnelProvider.swift index e820fe7..74244d9 100644 --- a/Sources/TunnelKitOpenVPNAppExtension/OpenVPNTunnelProvider.swift +++ b/Sources/TunnelKitOpenVPNAppExtension/OpenVPNTunnelProvider.swift @@ -794,7 +794,7 @@ extension OpenVPNTunnelProvider: OpenVPNSessionDelegate { newSettings.ipv6Settings = ipv6Settings newSettings.dnsSettings = dnsSettings newSettings.proxySettings = proxySettings - if let mtu = cfg.configuration.mtu { + if let mtu = cfg.configuration.mtu, mtu > 0 { newSettings.mtu = NSNumber(value: mtu) }