Subject: | Net::DNS::Resolver::Cygwin fails to find DHCP IP address |
Net-DNS-0.61
Perl 5.8.8
Cygwin 1.5.24(0.156/4/2) on Win2K/SP4
Cygwin: cpan installation of Net::DNS fails because make test fails.
The resolver object has an empty IP address, and therefore an empty
nameserver list.
I have a handful of interfaces on the box, and it turns out that the
DSL connection via RASPPPoE stores its IP in the registry under the
key "DhcpIPAddress", while "IPAddress" has a value of "0.0.0.0". Hence
the failure to test and install.
The attached patch fixes this by first checking for "DhcpIPAddress".
Cheers
Wolfgang
Subject: | Net-DNS-0.61-THIRTYSVN-cygwindhcpipaddress-01.patch |
--- lib/Net/DNS/Resolver/Cygwin.pm.orig 2007-08-01 13:48:36.000000000 +0200
+++ lib/Net/DNS/Resolver/Cygwin.pm 2007-10-07 05:21:30.062500000 +0200
@@ -88,7 +88,7 @@
my $ns;
my $ip;
- $ip = getregkey($regiface, "IPAddress");
+ $ip = getregkey($regiface, "DhcpIPAddress") || getregkey($regiface, "IPAddress");
$ns = getregkey($regiface, "NameServer") ||
getregkey($regiface, "DhcpNameServer") || '' unless !$ip || ($ip =~ /0\.0\.0\.0/);