Fix up misleading log from condition in latest commit

This commit is contained in:
Davide De Rosa 2021-01-26 10:59:37 +01:00
parent 0f097d50af
commit 3abb7cbccc
1 changed files with 9 additions and 7 deletions

View File

@ -711,7 +711,8 @@ extension OpenVPNTunnelProvider: OpenVPNSessionDelegate {
}
// fall back
if dnsSettings == nil && !dnsServers.isEmpty {
if dnsSettings == nil {
if !dnsServers.isEmpty {
log.info("DNS: Using servers \(dnsServers.maskedDescription)")
dnsSettings = NEDNSSettings(servers: dnsServers)
} else {
@ -719,6 +720,7 @@ extension OpenVPNTunnelProvider: OpenVPNSessionDelegate {
// 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)
if !isGateway {