Skip Menu |

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

Report information
The Basics
Id: 21292
Status: resolved
Priority: 0/
Queue: Net-DNS

People
Owner: Nobody in particular
Requestors: florin.i [...] tiscali.it
Cc:
AdminCc:

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



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>
Download (untitled)
application/pgp-signature 187b

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
Download dig.pcap
application/octet-stream 324b

Message body not shown because it is not plain text.

Download script.pcap
application/octet-stream 324b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #21292] Net::DNS 0.58 gives wrong answers
Date: Sun, 03 Sep 2006 10:22:11 +0200
To: bug-Net-DNS [...] rt.cpan.org
From: "Olaf M. Kolkman" <olaf [...] dacht.net>
(Resend to rt.cpan.org apologies for duplicates) Show quoted text
> > $ 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; > >
>
The input to the new method is supposed to be a reference to a scalar containing the wire format data, not a reference to a packet object. my $query = $res->query("google.it"); my $data=$query->data; my $header = Net::DNS::Header->new(\$data); $header->print; or alternatively my $query = $res->query("google.it"); $query->header->print; Olaf...
Download signature.asc
application/pgp-signature 252b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #21292] Net::DNS 0.58 gives wrong answers
Date: Sun, 3 Sep 2006 10:52:44 +0200
To: "Olaf M. Kolkman via RT" <bug-Net-DNS [...] rt.cpan.org>
From: Florin Iamandi <florin.i [...] tiscali.it>
Olaf M. Kolkman (2006-09-03, 10:24:05): Show quoted text
> The input to the new method is supposed to be a reference to a scalar > containing the wire format data, not a reference to a packet object. > > my $query = $res->query("google.it"); > my $data=$query->data; > my $header = Net::DNS::Header->new(\$data); > $header->print; > > > or alternatively > > > my $query = $res->query("google.it"); > $query->header->print;
Thank you. Guess this is what usually happens on a regular Saturday night when instead of sleeping one tries and fails to properly read the documentation. Appologies for the waste of time. -- Digitally yours, Florin Iamandi (Slippery) Reason is the first victim of emotion. -- Scytale, Dune Messiah
Download (untitled)
application/pgp-signature 189b

Message body not shown because it is not plain text.