The IP address detection logic (for PTR query magic) in
Net::DNS::Resolver::Base::make_query_packet() is seriously broken as of
Net::DNS 0.60.
The documentation for Net::DNS::Resolver::send() specifies:
| The argument list can be either a Net::DNS::Packet object or a list
| of strings. The record type and class can be omitted; they default to
| A and IN. If the name looks like an IP address (Ipv4 or IPv6), then
| an appropriate PTR query will be performed.
However, "foo:bar/baz.example.com" does NOT look like an IP address!
Binary package hint: libnet-dns-perl
The IP address detection logic (for PTR query magic) in :Resolver: :Base:: make_query_ packet( ) is seriously broken as of
Net::DNS:
Net::DNS 0.60.
The documentation for Net::DNS: :Resolver: :send() specifies:
| The argument list can be either a Net::DNS::Packet object or a list
| of strings. The record type and class can be omitted; they default to
| A and IN. If the name looks like an IP address (Ipv4 or IPv6), then
| an appropriate PTR query will be performed.
However, "foo:bar/ baz.example. com" does NOT look like an IP address!
Setting up libnet-dns-perl (0.60-1) ... DNS::Resolver -MData::Dumper -e 'my $r = Net::DNS: :Resolver- >new(); my $packet = $r->make_ query_packet( "foo:bar/ baz.example. com", "A"); print(Dumper( $packet- >question) )'
'qclass' => 'IN',
'qname' => 'r.a.b. 0.o.o.f. 0.ip6.arpa' ,
'qtype' => 'PTR' :Question' );
$ perl -MNet::
$VAR1 = bless( {
}, 'Net::DNS:
Setting up libnet-dns-perl (0.59-1build1) ... DNS::Resolver -MData::Dumper -e 'my $r = Net::DNS: :Resolver- >new(); my $packet = $r->make_ query_packet( "foo:bar/ baz.example. com", "A"); print(Dumper( $packet- >question) )'
'qclass' => 'IN',
'qname' => 'foo:bar/ baz.example. com',
'qtype' => 'A' :Question' );
$ perl -MNet::
$VAR1 = bless( {
}, 'Net::DNS:
It looks like the problem is a regex that believes that if both ":" and "/" appear in a domain name it must be an IPv6 address. These are both legal.