In the loadConfig2000() function of jdk/src/windows/native/sun/net/dns/ResolverConfigurationImpl.c, if the SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\SearchList registry entry is empty, the code goes inside S\C\S\T\P\Interfaces\<Interface Name>, and looks for EnableDhcp, Domain, and DhcpDomain *there*.
In fact, according to http://support.microsoft.com/kb/314053, Domain is also at the S\C\S\T\P level. Also, according to http://technet.microsoft.com/en-us/library/cc938255.aspx, DhcpDomain is useless in Windows 2000+.
On my Windows 2003 system, S\C\S\T\P\SearchList is empty, but S\C\S\T\P\Domain is not, and searchlist() returns an empty list. On the other hand, I do see a non-empty srchlist value (=S\C\S\T\P\Domain) in nslookup.
Maybe search order can be:
0. goinside \S\C\S\T\P\
1. try SearchList
2. try Domain
3. for each $interface:
goinside Interfaces\$interface
if EnableDhcp:
try Domain
In fact, according to http://support.microsoft.com/kb/314053, Domain is also at the S\C\S\T\P level. Also, according to http://technet.microsoft.com/en-us/library/cc938255.aspx, DhcpDomain is useless in Windows 2000+.
On my Windows 2003 system, S\C\S\T\P\SearchList is empty, but S\C\S\T\P\Domain is not, and searchlist() returns an empty list. On the other hand, I do see a non-empty srchlist value (=S\C\S\T\P\Domain) in nslookup.
Maybe search order can be:
0. goinside \S\C\S\T\P\
1. try SearchList
2. try Domain
3. for each $interface:
goinside Interfaces\$interface
if EnableDhcp:
try Domain
- duplicates
-
JDK-7006496 Use modern Windows API to retrieve OS DNS servers
- Resolved