TunnelProvider: remove all cleverness

This will cause more socket flaps than necessary but hopefully will fix
some bugs.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2019-06-10 18:47:39 +02:00
parent 6a6be9edde
commit e70c397e54
1 changed files with 1 additions and 5 deletions

View File

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