Log info about DNS servers in use

This commit is contained in:
Davide De Rosa 2019-07-03 19:04:53 +02:00
parent c40d42c772
commit b04f7f20d4

View File

@ -628,7 +628,9 @@ extension OpenVPNTunnelProvider: OpenVPNSessionDelegate {
var dnsServers = cfg.sessionConfiguration.dnsServers ?? options.dnsServers ?? []
// fall back
if dnsServers.isEmpty {
if !dnsServers.isEmpty {
log.info("DNS: Using servers \(dnsServers.maskedDescription)")
} else {
log.warning("DNS: No servers provided, using fall-back servers: \(fallbackDNSServers.maskedDescription)")
dnsServers = fallbackDNSServers
}