Subject: | Net::DNS 0.58 gives wrong answers |
Date: | Sun, 3 Sep 2006 06:18:14 +0200 |
To: | bug-Net-DNS [...] rt.cpan.org, olaf [...] net-dns.org |
From: | Florin Iamandi <florin.i [...] tiscali.it> |
Message body not shown because it is not plain text.
Greetings.
I am testing Net::DNS 0.58 on an OpenBSD 4.0 machine, Perl v5.8.8.
While I am asking the name server to perform a recursive query, which it
does, Net::DNS doesn't get the answer right. Notice the rd and ra flags
are set (the dig reply) yet Net::DNS considers them not set.
$ cat p-get_header.pl
#!/usr/bin/perl -w
use strict;
use Net::DNS;
my $res = Net::DNS::Resolver->new(
nameservers => ['217.11.80.19'],
recurse => 1,
);
my $query = $res->query("google.it");
my $header = Net::DNS::Header->new(\$query);
$header->print;
$ ./p-get_header.pl
;; id = 20069
;; qr = 0 opcode = 14 aa = 1 tc = 0 rd = 0
;; ra = 0 ad = 1 cd = 1 rcode = NOTZONE
;; qdcount = 14916 ancount = 20051 nscount = 14906 arcount = 20577
$ dig @217.11.80.19 google.it
; <<>> DiG 9.3.2 <<>> @217.11.80.19 google.it
; (1 server found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25337
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 4, ADDITIONAL: 0
I also took a look using wireshark at the packets for these two queries
and can confirm that Net::DNS is indeed wrong about these flags.
The packet captures are attached in case anyone wants to have a look.
--
Digitally yours,
Florin Iamandi (Slippery)
Reason is the first victim of emotion. -- Scytale, Dune Messiah
Message body not shown because it is not plain text.
Message body not shown because it is not plain text.