For some DNS queries Net-DNS returns error messages to the console:
Exception: incomplete data
at /usr/local/lib/perl5/site_perl/5.8.5/mach/Net/DNS/RR.pm
line 513, <IN> line 58.
Query to reproduce :
PTR 73.88.194.66.in-addr.arpa.
I use Net-DNS in background mode ("bgsend", "bgread" methods). Error
message shows when I'm trying to read "answer" property. Code example:
my $res = Net::DNS::Resolver->new;
my $socket = $res->bgsend("PTR 73.88.194.66.in-addr.arpa.");
if ($res->bgisready($socket)) {
$nsq = $res->bgread($socket);
if ($nsq) {
foreach $rr ($nsq->answer) {
..
}
}
}
Data index received from Net::DNS::Packet::dn_expand() is wrong.
Therefore resolver can't parse the answer.
Please note, that on Net-DNS pre 0.62 version the same queries have
been resolved with empty result, and as we could expect - no any
exceptions to the console.
But Unix "dig PTR 73.88.194.66.in-addr.arpa." command returns good
result:
; <<>> DiG 9.3.2 <<>> PTR 73.88.194.66.in-addr.arpa.
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52148
;; flags: qr rd ra; QUERY: 1, ANSWER: 32, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;73.88.194.66.in-addr.arpa. IN PTR
;; ANSWER SECTION:
73.88.194.66.in-addr.arpa. 3305 IN PTR spasweats.com.
73.88.194.66.in-addr.arpa. 3305 IN PTR emtrend.net.
...
Perl version - v5.8.5;
OS - FreeBSD 6.1-RELEASE/amd64
Ports installed:
p5-Digest-SHA1-2.11
p5-Net-DNS-0.63