From 3abb7cbcccc52b443feec243ef5a9ef563b6a78b Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Tue, 26 Jan 2021 10:59:37 +0100 Subject: [PATCH] Fix up misleading log from condition in latest commit --- .../AppExtension/OpenVPNTunnelProvider.swift | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/TunnelKit/Sources/Protocols/OpenVPN/AppExtension/OpenVPNTunnelProvider.swift b/TunnelKit/Sources/Protocols/OpenVPN/AppExtension/OpenVPNTunnelProvider.swift index ee30329..0da1442 100644 --- a/TunnelKit/Sources/Protocols/OpenVPN/AppExtension/OpenVPNTunnelProvider.swift +++ b/TunnelKit/Sources/Protocols/OpenVPN/AppExtension/OpenVPNTunnelProvider.swift @@ -711,13 +711,15 @@ extension OpenVPNTunnelProvider: OpenVPNSessionDelegate { } // fall back - if dnsSettings == nil && !dnsServers.isEmpty { - log.info("DNS: Using servers \(dnsServers.maskedDescription)") - dnsSettings = NEDNSSettings(servers: dnsServers) - } else { -// log.warning("DNS: No servers provided, using fall-back servers: \(fallbackDNSServers.maskedDescription)") -// dnsSettings = NEDNSSettings(servers: fallbackDNSServers) - log.warning("DNS: No settings provided, using current network settings") + if dnsSettings == nil { + if !dnsServers.isEmpty { + log.info("DNS: Using servers \(dnsServers.maskedDescription)") + dnsSettings = NEDNSSettings(servers: dnsServers) + } else { +// log.warning("DNS: No servers provided, using fall-back servers: \(fallbackDNSServers.maskedDescription)") +// dnsSettings = NEDNSSettings(servers: fallbackDNSServers) + log.warning("DNS: No settings provided, using current network settings") + } } // "hack" for split DNS (i.e. use VPN only for DNS)