]> git.ipfire.org Git - thirdparty/wireguard-apple.git/commitdiff
NetworkExtension: don't use exit(0) hack on Catalina
authorJason A. Donenfeld <Jason@zx2c4.com>
Tue, 15 Oct 2019 09:44:13 +0000 (11:44 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Tue, 15 Oct 2019 09:44:13 +0000 (11:44 +0200)
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift

index f8d87d731cfcf4562fc6e2210465d0b035a08a87..cf062afb8dd85ee866065c2b9b42031b79cd1815 100644 (file)
@@ -99,7 +99,10 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
         // HACK: This is a filthy hack to work around Apple bug 32073323 (dup'd by us as 47526107).
         // Remove it when they finally fix this upstream and the fix has been rolled out to
         // sufficient quantities of users.
-        exit(0)
+        let osVersion = ProcessInfo.processInfo.operatingSystemVersion
+        if osVersion.majorVersion <= 10 && osVersion.minorVersion <= 14 {
+            exit(0)
+        }
         #endif
     }