Skip Menu |

This queue is for tickets about the Net-DNS CPAN distribution.

Report information
The Basics
Id: 13922
Status: resolved
Priority: 0/
Queue: Net-DNS

People
Owner: Nobody in particular
Requestors: Mike.Mitchell [...] sas.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 0.50
  • 0.51
  • 0.51_01
  • 0.51_02
  • 0.52
  • 0.53
Fixed in: 0.49



Subject: socket problem
When I try a DNS query using version 0.53 of Net::DNS, I get the following error message: Can't coerce array into hash at /usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris/Net/DNS/Resolver/Base.pm line 626. The same query works correctly with version 0.49. perl -v output: This is perl, v5.8.0 built for sun4-solaris uname -a output: SunOS nine 5.9 Generic_112233-11 sun4u sparc SUNW,Sun-Fire-280R gcc -v output: Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.2.1/specs Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --disable-nls Thread model: posix gcc version 3.2.1
[guest - Fri Jul 29 14:44:04 2005]: Show quoted text
> When I try a DNS query using version 0.53 of Net::DNS, I get the > following error message: > Can't coerce array into hash at > /usr/local/lib/perl5/site_perl/5.8.0/sun4- > solaris/Net/DNS/Resolver/Base.pm line 626. > > The same query works correctly with version 0.49.
Could you please try this patch: --- lib/Net/DNS/Resolver/Base.pm (revision 477) +++ lib/Net/DNS/Resolver/Base.pm (working copy) @@ -574,8 +574,8 @@ my $sock; my $sock_key = "$ns:$dstport"; my ($host,$port); - if ($self->persistent_tcp && $self->{'sockets'}{$sock_key}) { - $sock = $self->{'sockets'}{$sock_key}; + if ($self->persistent_tcp && $self->{'sockets'}[AF_UNSPEC]{$sock_key}) { + $sock = $self->{'sockets'}[AF_UNSPEC]{$sock_key}; print ";; using persistent socket\n" if $self->{'debug'}; } else { @@ -623,7 +623,7 @@ next; } - $self->{'sockets'}{$sock_key} = $sock; + $self->{'sockets'}[AF_UNSPEC]{$sock_key} = $sock; } my $lenmsg = pack('n', length($packet_data)); @@ -1261,8 +1261,8 @@ my $sock; my $sock_key = "$ns:$self->{'port'}"; - if ($self->{'persistent_tcp'} && $self->{'sockets'}->{$sock_key}) { - $sock = $self->{'sockets'}->{$sock_key}; + if ($self->{'persistent_tcp'} && $self->{'sockets'}[AF_UNSPEC]{$sock_key}) { + $sock = $self->{'sockets'}[AF_UNSPEC]{$sock_key}; print ";; using persistent socket\n" if $self->{'debug'}; } else { @@ -1297,7 +1297,7 @@ next; } - $self->{'sockets'}{$sock_key} = $sock; + $self->{'sockets'}[AF_UNSPEC]{$sock_key} = $sock; }
Show quoted text
> I'll see if I can reproduce the AXFR problem.
I have failed to reproduce the error. I have a lettle testscript that demonstrates that axfr correctly times out. see http://www.net-dns.org/t/12-TestNS.t $resolver->nameserver( qw( 127.53.53.1 ) ); $resolver->tcp_timeout($tcptimeout); $resolver->axfr('example.com'); is( $resolver->errorstring,"timeout", "AXFR timed out"); Closing the ticket