diff --git a/dns/win32util.py b/dns/win32util.py index b2ca61dae..3e67c6bb2 100644 --- a/dns/win32util.py +++ b/dns/win32util.py @@ -51,9 +51,10 @@ def run(self): try: system = wmi.WMI() for interface in system.Win32_NetworkAdapterConfiguration(): - if interface.IPEnabled and interface.DNSDomain: - self.info.domain = _config_domain(interface.DNSDomain) + if interface.IPEnabled and interface.DNSServerSearchOrder: self.info.nameservers = list(interface.DNSServerSearchOrder) + if interface.DNSDomain: + self.info.domain = _config_domain(interface.DNSDomain) if interface.DNSDomainSuffixSearchOrder: self.info.search = [ _config_domain(x)