Skip Menu |

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

Report information
The Basics
Id: 103853
Status: rejected
Priority: 0/
Queue: Net-DNS

People
Owner: Nobody in particular
Requestors: wolfgang [...] virtualnetworks.eu
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: empty domain label
Date: Tue, 21 Apr 2015 13:45:14 +0200
To: bug-Net-DNS [...] rt.cpan.org
From: Wolfgang Blau <wolfgang [...] virtualnetworks.eu>
Hi there, when doing a reverse query Net::DNS stops the perl script: 14: if (my $ap = $r->query( $reverse, 'PTR' )) { DB<3> c empty domain label at /opt/local/lib/perl5/site_perl/5.16.3/darwin-thread-multi-2level/Net/DNS/Question.pm line 80. at /opt/local/lib/perl5/site_perl/5.16.3/darwin-thread-multi-2level/Net/DNS/Domain.pm line 116, <> line 1. Net::DNS::Domain::new('Net::DNS::DomainName1035', '.in-addr.arpa') called at /opt/local/lib/perl5/site_perl/5.16.3/darwin-thread-multi-2level/Net/DNS/Question.pm line 80 Net::DNS::Question::new('Net::DNS::Question', '.in-addr.arpa', 'PTR') called at /opt/local/lib/perl5/site_perl/5.16.3/darwin-thread-multi-2level/Net/DNS/Packet.pm line 76 Net::DNS::Packet::new('Net::DNS::Packet', '.in-addr.arpa', 'PTR') called at /opt/local/lib/perl5/site_perl/5.16.3/darwin-thread-multi-2level/Net/DNS/Resolver/Base.pm line 1079 Net::DNS::Resolver::Base::make_query_packet('Net::DNS::Resolver=HASH(0x7fba722c70e8)', '.in-addr.arpa', 'PTR') called at /opt/local/lib/perl5/site_perl/5.16.3/darwin-thread-multi-2level/Net/DNS/Resolver/Base.pm line 501 Net::DNS::Resolver::Base::send('Net::DNS::Resolver=HASH(0x7fba722c70e8)', '.in-addr.arpa', 'PTR') called at /opt/local/lib/perl5/site_perl/5.16.3/darwin-thread-multi-2level/Net/DNS/Resolver/Base.pm line 492 Net::DNS::Resolver::Base::query('Net::DNS::Resolver=HASH(0x7fba722c70e8)', '.in-addr.arpa', 'PTR') called at /Users/azzurro/Documents/Source/Perl/http2curl.pl line 14 Debugged program terminated. Use q to quit or R to restart, Net::DNS should return an empty list according to the doc. You can try it out using IP 193.247.167.10 I’m using $ perl -V Summary of my perl5 (revision 5 version 16 subversion 3) configuration: Platform: osname=darwin, osvers=14.0.0, archname=darwin-thread-multi-2level uname='darwin tenten-slave.macports.org 14.0.0 darwin kernel version 14.0.0: fri sep 19 00:26:44 pdt 2014; root:xnu-2782.1.97~2release_x86_64 x86_64 ' config_args='-Dinc_version_list=5.16.1/darwin-thread-multi-2level 5.16.1 5.16.0/darwin-thread-multi-2level 5.16.0 -des -Dprefix=/opt/local -Dscriptdir=/opt/local/bin -Dcppflags=-I/opt/local/include -Dccflags=-pipe -Os -Dldflags=-L/opt/local/lib -Wl,-headerpad_max_install_names -Dvendorprefix=/opt/local -Dusemultiplicity=y -Dusethreads -Duseshrplib -Dcc=/usr/bin/clang -Dld=env MACOSX_DEPLOYMENT_TARGET=10.10 /usr/bin/clang -Dman1ext=1pm -Dman3ext=3pm -Dman1dir=/opt/local/share/man/man1p -Dman3dir=/opt/local/share/man/man3p -Dsitebin=/opt/local/libexec/perl5.16/sitebin -Dsiteman1dir=/opt/local/share/perl5.16/siteman/man1 -Dsiteman3dir=/opt/local/share/perl5.16/siteman/man3 -Dvendorbin=/opt/local/libexec/perl5.16 -Dvendorman1dir=/opt/local/share/perl5.16/man/man1 -Dvendorman3dir=/opt/local/share/perl5.16/man/man3 -Dpager=/usr/bin/less -sR -Dperlpath=/opt/local/bin/perl5.16 -Dstartperl=#!/opt/local/bin/perl5.16' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='/usr/bin/clang', ccflags ='-pipe -Os -fno-common -DPERL_DARWIN -I/opt/local/include -fno-strict-aliasing -fstack-protector -I/opt/local/include', optimize='-O3', cppflags='-I/opt/local/include -pipe -Os -fno-common -DPERL_DARWIN -I/opt/local/include -fno-strict-aliasing -fstack-protector -I/opt/local/include' ccversion='', gccversion='4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='env MACOSX_DEPLOYMENT_TARGET=10.10 /usr/bin/clang', ldflags ='-L/opt/local/lib -Wl,-headerpad_max_install_names -fstack-protector' libpth=/opt/local/lib /usr/lib libs=-lgdbm -ldbm -ldl -lm -lutil -lc perllibs=-ldl -lm -lutil -lc libc=, so=dylib, useshrplib=true, libperl=libperl.dylib gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-L/opt/local/lib -Wl,-headerpad_max_install_names -bundle -undefined dynamic_lookup -fstack-protector' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API Built under darwin Compiled at Jan 8 2015 16:14:39 @INC: /opt/local/lib/perl5/site_perl/5.16.3/darwin-thread-multi-2level /opt/local/lib/perl5/site_perl/5.16.3 /opt/local/lib/perl5/vendor_perl/5.16.3/darwin-thread-multi-2level /opt/local/lib/perl5/vendor_perl/5.16.3 /opt/local/lib/perl5/5.16.3/darwin-thread-multi-2level /opt/local/lib/perl5/5.16.3 /opt/local/lib/perl5/site_perl /opt/local/lib/perl5/vendor_perl Cheers. W.

Message body is not shown because it is too large.

Download signature.asc
application/pgp-signature 842b

Message body not shown because it is not plain text.

From: rwfranks [...] acm.org
On Tue Apr 21 07:45:35 2015, wolfgang@virtualnetworks.eu wrote: Show quoted text
> when doing a reverse query Net::DNS stops the perl script: > > 14: if (my $ap = $r->query( $reverse, 'PTR' )) { > DB<3> c > empty domain label at /opt/local/lib/perl5/site_perl/5.16.3/darwin- > thread-multi-2level/Net/DNS/Question.pm line 80. > at /opt/local/lib/perl5/site_perl/5.16.3/darwin-thread-multi- > 2level/Net/DNS/Domain.pm line 116, <> line 1. > Net::DNS::Domain::new('Net::DNS::DomainName1035', '.in- > addr.arpa') called at /opt/local/lib/perl5/site_perl/5.16.3/darwin- > thread-multi-2level/Net/DNS/Question.pm line 80 > Net::DNS::Question::new('Net::DNS::Question', '.in-addr.arpa', > 'PTR') called at /opt/local/lib/perl5/site_perl/5.16.3/darwin-thread- > multi-2level/Net/DNS/Packet.pm line 76 > Net::DNS::Packet::new('Net::DNS::Packet', '.in-addr.arpa', > 'PTR') called at /opt/local/lib/perl5/site_perl/5.16.3/darwin-thread- > multi-2level/Net/DNS/Resolver/Base.pm line 1079 > Net::DNS::Resolver::Base::make_query_packet('Net::DNS::Resolver=HASH(0x7fba722c70e8)', > '.in-addr.arpa', 'PTR') called at > /opt/local/lib/perl5/site_perl/5.16.3/darwin-thread-multi- > 2level/Net/DNS/Resolver/Base.pm line 501 > Net::DNS::Resolver::Base::send('Net::DNS::Resolver=HASH(0x7fba722c70e8)', > '.in-addr.arpa', 'PTR') called at > /opt/local/lib/perl5/site_perl/5.16.3/darwin-thread-multi- > 2level/Net/DNS/Resolver/Base.pm line 492 > Net::DNS::Resolver::Base::query('Net::DNS::Resolver=HASH(0x7fba722c70e8)', > '.in-addr.arpa', 'PTR') called at
============= Show quoted text
> /Users/azzurro/Documents/Source/Perl/http2curl.pl line 14 > Debugged program terminated. Use q to quit or R to restart, >
The failure clearly occurs *before* calling $r->query() Net::DNS correctly reports the empty label at LHS of '.in-addr.arpa' If you want to perform a reverse lookup, this can be done directly: $r->query( '193.247.167.10' ) which, in this case, returns undef because the corresponding PTR record can not be found, probably because the destination nameserver is bug-riddled, mis-configured, or both. ;; query(10.167.247.193.in-addr.arpa, PTR) ;; setting up AF_INET6 UDP socket with srcaddr [::] ... done ;; setting up AF_INET UDP socket with srcaddr [0.0.0.0] ... done ;; send_udp [164.128.36.34]:53 ;; answer from [164.128.36.34] (124 bytes) ;; HEADER SECTION ;; id = 63917 ;; qr = 1 aa = 0 tc = 0 rd = 1 opcode = QUERY ;; ra = 0 z = 0 ad = 0 cd = 0 rcode = NOERROR ;; qdcount = 1 ancount = 0 nscount = 2 arcount = 2 ;; do = 0 ;; QUESTION SECTION (1 record) ;; 10.167.247.193.in-addr.arpa. IN PTR ;; ANSWER SECTION (0 records) ;; AUTHORITY SECTION (2 records) 167.247.193.in-addr.arpa. 21600 IN NS ns1.ip-plus.net. 167.247.193.in-addr.arpa. 21600 IN NS ns2.ip-plus.net. ;; ADDITIONAL SECTION (2 records) ns1.ip-plus.net. 21600 IN A 164.128.36.34 ns2.ip-plus.net. 21600 IN A 164.128.76.39 Show quoted text
> Net::DNS should return an empty list according to the doc. You can try > it out using IP 193.247.167.10
Suggest you read the documentation more carefully. $r->query() *never* returns an empty list. Result is either 1) a Net::DNS::Packet object containing the answer, or 2) undef if the requested RRset not found.