aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-12-22 15:45:09 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2018-12-22 15:45:09 +0100
commitdddbf3b3707e021b0f6d1342e56f6f70e613c923 (patch)
tree9f560a0f7f9bfc1ab31e9f3385a768c3efeb2718 /WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift
parentDon't set username on NETunnelProviderProtocol (diff)
downloadwireguard-apple-dddbf3b3707e021b0f6d1342e56f6f70e613c923.tar.xz
wireguard-apple-dddbf3b3707e021b0f6d1342e56f6f70e613c923.zip
Retain aggressive socket reestablishment for now
This can be reverted once we've done more testing. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r--WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift3
1 files changed, 2 insertions, 1 deletions
diff --git a/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift b/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift
index ca8902f2..f33d5f65 100644
--- a/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift
+++ b/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift
@@ -113,7 +113,8 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
private func pathUpdate(path: Network.NWPath) {
guard let handle = wgHandle, let packetTunnelSettingsGenerator = packetTunnelSettingsGenerator else { return }
var listenPort: UInt16?
- if path.availableInterfaces.isEmpty || lastFirstInterface != path.availableInterfaces.first {
+ //TODO(zx2c4): Remove the `true` here after extensive testing with network/cell simulations.
+ if true || path.availableInterfaces.isEmpty || lastFirstInterface != path.availableInterfaces.first {
listenPort = wgGetListenPort(handle)
lastFirstInterface = path.availableInterfaces.first
}