WireGuardKit: Log XLAT resolution errors

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
This commit is contained in:
Andrej Mihajlov
2020-12-03 15:10:29 +01:00
parent 9e909a3294
commit d440a91b0e
2 changed files with 20 additions and 5 deletions
+5 -1
View File
@@ -336,7 +336,11 @@ public class WireGuardAdapter {
#if os(iOS)
if let settingsGenerator = self.settingsGenerator {
wgSetConfig(handle, settingsGenerator.endpointUapiConfiguration())
let (wgSettings, resolutionErrors) = settingsGenerator.endpointUapiConfiguration()
for error in resolutionErrors {
self.logHandler(.error, "Failed to re-resolve \(error.address): \(error.errorDescription ?? "(nil)")")
}
wgSetConfig(handle, wgSettings)
}
#endif