Kit: Adapter: do not treat NE settings timeouts as fatal

The general Network Extension framework is incredibly buggy, and a
timeout when setting the network settings does not necessarily imply
that the whole operation failed. Simply log the condition and move on.
This restores the app's old behavior.

Reported-by: Filipe Mendonça <cfilipem@gmail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld
2020-12-17 00:24:39 +01:00
parent 20bdf46792
commit db4e2915f3
2 changed files with 1 additions and 9 deletions
@@ -57,11 +57,6 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
errorNotifier.notify(PacketTunnelProviderError.couldNotSetNetworkSettings)
completionHandler(PacketTunnelProviderError.couldNotSetNetworkSettings)
case .setNetworkSettingsTimeout:
wg_log(.error, message: "Starting tunnel failed with setTunnelNetworkSettings timing out")
errorNotifier.notify(PacketTunnelProviderError.couldNotSetNetworkSettings)
completionHandler(PacketTunnelProviderError.couldNotSetNetworkSettings)
case .startWireGuardBackend(let errorCode):
wg_log(.error, message: "Starting tunnel failed with wgTurnOn returning \(errorCode)")
errorNotifier.notify(PacketTunnelProviderError.couldNotStartBackend)