Subject: | Resolver.pm problem under Win32 (Compaq NIC Teaming) |
Distribution Name: Net::DNS::Resolver
Version:1.26
OS: Microsoft Windows 2000 Server
Perl version: v5.6.1 built for MSWin32-x86-multi-thread Binary build 630.
Ran into a rather odd failing of logic in the Resolver.pm
In res_init_microsoft(), Win32::Registry is used to query a specific registry key. Under most circumstances, this works perfectly.
Unfortunately, I found one set of circumstances where it doesn't work, and every one of my servers falls into this set of circumstances. (all CPQ machines, with CPQ NIC Teaming active)
I would suggest that another method of obtaining system defined nameservers under Win32 be explored, or at least a note be added documenting this issue.
In a server with Compaq NIC Teaming (software based NIC teaming) active, the registry key SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
may hold a "nameserver" key value, but it <b>won't</b> have a value. The value will be blank. This will result in the resolve attempt failing, despite being able to resolve addresses at the OS command prompt level.
In the case of Compaq NIC Teaming being installed and active, the nameserver key value appears to live under the SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces
tree, under the interface key specific to the NIC Teaming virtual interface (which is a pseudorandom very long alpha numeric string, not a name, )as a key/value of nameserver/dnsip#,dnsip#
Possible approaches to handling the problem -
1. Iteratively interregate each key under Interfaces, and look for non-null / non-0.0.0.0 result for the value of the nameserver subkey.
2. Use a system call to "ipconfig / all" and parse return to derive configured nameserver(s).
I can't directly provide code to specifically reproduce this bug, as the problem isn't with the Net::DNS code itself, but rather with an assumption regarding the location of nameserver values within the Win32 registry.
I am attaching a Win32 registry extract from an example server, and will make myself available for any questions / testing needed.
As a workaround, manually placing the dnsip# info into the empty nameserver key at SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
does allow lookups to work correctly, however, this is a rather brute force workaround, and subject to being "fixed" should the NIC teaming software be reinstalled.
-Mike Gucciard
-Sr. Technical Architect
-SBC Services Inc.
-312-575-1365
Message body not shown because it is not plain text.