]> git.ipfire.org Git - thirdparty/wireguard-apple.git/commitdiff
TunnelProvider: remove all cleverness
authorJason A. Donenfeld <Jason@zx2c4.com>
Mon, 10 Jun 2019 16:47:39 +0000 (18:47 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Mon, 10 Jun 2019 16:47:39 +0000 (18:47 +0200)
This will cause more socket flaps than necessary but hopefully will fix
some bugs.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift

index 2ecd610c6ed3a1d070bfa2966090345a4435a7c1..f8d87d731cfcf4562fc6e2210465d0b035a08a87 100644 (file)
@@ -11,7 +11,6 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
     private var handle: Int32?
     private var networkMonitor: NWPathMonitor?
     private var ifname: String?
-    private var lastPath: Network.NWPath?
     private var packetTunnelSettingsGenerator: PacketTunnelSettingsGenerator?
 
     deinit {
@@ -150,10 +149,7 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
             _ = packetTunnelSettingsGenerator.endpointUapiConfiguration().withGoString { return wgSetConfig(handle, $0) }
         }
         #endif
-        if path != lastPath {
-            lastPath = path
-            wgBumpSockets(handle)
-        }
+        wgBumpSockets(handle)
     }
 }