Check if cfg.sessionConfiguration.dnsServers is empty (#198)
This commit is contained in:
parent
790ec276db
commit
4b3f3dee5f
|
@ -718,7 +718,13 @@ extension OpenVPNTunnelProvider: OpenVPNSessionDelegate {
|
|||
|
||||
// fall back
|
||||
if dnsSettings == nil {
|
||||
dnsServers = cfg.sessionConfiguration.dnsServers ?? options.dnsServers ?? []
|
||||
dnsServers = []
|
||||
if let servers = cfg.sessionConfiguration.dnsServers,
|
||||
!servers.isEmpty {
|
||||
dnsServers = servers
|
||||
} else if let servers = options.dnsServers {
|
||||
dnsServers = servers
|
||||
}
|
||||
if !dnsServers.isEmpty {
|
||||
log.info("DNS: Using servers \(dnsServers.maskedDescription)")
|
||||
dnsSettings = NEDNSSettings(servers: dnsServers)
|
||||
|
|
Loading…
Reference in New Issue