Subject: | Resolver search() erroneously applies search list to IPv6 address |
Resolver search() fails to recognise IPv6 address and attempts a search
instead of performing simple query. This precipitates a further failure
in query() which leaves the question section empty.
print "\nPerl ", $], "\n";
system("uname -srp");
use Net::DNS;
print "Net::DNS ", Net::DNS::version(), "\n";
my $resolver = Net::DNS::Resolver->new( debug=>1 );
$resolver->searchlist('example.net');
$resolver->search("::1");
produces following garbled query:
Perl 5.008008
Linux 2.6.17-1.2174_FC5 i686
Net::DNS 0.58
;; search(::1.example.net, A, IN)
;;
query(x.e...1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa.,
PTR, IN)
;; Trying to set up a AF_INET6() family type UDP socket with srcaddr:
0.0.0.0 ... done
;; setting up an AF_INET() family type UDP socket
;; send_udp(192.168.1.1:53)
;; answer from 192.168.1.1:53 : 12 bytes
;; HEADER SECTION
;; id = 38080
;; qr = 1 opcode = QUERY aa = 0 tc = 0 rd = 1
;; ra = 1 ad = 0 cd = 0 rcode = REFUSED
;; qdcount = 0 ancount = 0 nscount = 0 arcount = 0
;; QUESTION SECTION (0 records)
;; ANSWER SECTION (0 records)
;; AUTHORITY SECTION (0 records)
;; ADDITIONAL SECTION (0 records)
RCODE: REFUSED; trying next nameserver
;; search(::1, A, IN)
;;
query(..1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa.,
PTR, IN)
;; Trying to set up a AF_INET6() family type UDP socket with srcaddr:
0.0.0.0 ... done
;; setting up an AF_INET() family type UDP socket
;; send_udp(192.168.1.1:53)
;; answer from 192.168.1.1:53 : 149 bytes
;; HEADER SECTION