Activity log for bug #141546

Date Who What changed Old value New value Message
2007-09-21 16:45:50 Scott Kitterman bug added bug
2007-09-21 16:51:39 Scott Kitterman description Binary package hint: libnet-dns-perl 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! Setting up libnet-dns-perl (0.60-1) ... $ perl -MNet::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))' $VAR1 = bless( { 'qclass' => 'IN', 'qname' => 'r.a.b.0.o.o.f.0.ip6.arpa', 'qtype' => 'PTR' }, 'Net::DNS::Question' ); Setting up libnet-dns-perl (0.59-1build1) ... $ perl -MNet::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))' $VAR1 = bless( { 'qclass' => 'IN', 'qname' => 'foo:bar/baz.example.com', 'qtype' => 'A' }, 'Net::DNS::Question' ); 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. Binary package hint: libnet-dns-perl 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! Setting up libnet-dns-perl (0.60-1) ... $ perl -MNet::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))' $VAR1 = bless( { 'qclass' => 'IN', 'qname' => 'r.a.b.0.o.o.f.0.ip6.arpa', 'qtype' => 'PTR' }, 'Net::DNS::Question' ); Setting up libnet-dns-perl (0.59-1build1) ... $ perl -MNet::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))' $VAR1 = bless( { 'qclass' => 'IN', 'qname' => 'foo:bar/baz.example.com', 'qtype' => 'A' }, 'Net::DNS::Question' ); 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. Upstream bug is https://rt.cpan.org/Public/Bug/Display.html?id=29531 but my LP foo is insuffienct to link to it.
2007-09-21 16:52:15 Scott Kitterman title make_query_packet() IP address detection seriously broken make_query_packet() IP address detection broken
2007-09-21 16:53:31 Scott Kitterman libnet-dns-perl: status New Confirmed
2007-09-21 16:57:08 Scott Kitterman libnet-dns-perl: importance Undecided Low
2008-01-15 05:40:05 Launchpad Janitor libnet-dns-perl: status Confirmed Fix Released