Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: zaphodb [...] zaphods.net
Cc:
AdminCc:

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



Subject: rcode is NOTZONE whatever i do
Tried the following but everytime the rcode is NOTZONE i am expecting NOERROR. best regards, Stefan #!/usr/bin/perl use strict; use warnings; use Net::DNS; my $res=Net::DNS::Resolver->new( nameservers => [qw(194.97.3.1)], #recurse => 0, recurse => 1, debug => 1, ); #my $answer=$res->query("roka.net","SOA"); #my $answer=$res->query("roka.net.","SOA"); my $answer=$res->query("localhost.","A"); #my $answer=$res->query("www.roka.net","A"); #my $answer=$res->search("www.roka.net"); #my $answer=$res->query("strato.de","SOA"); die("no valid answer") if (not defined $answer); print "\$answer=\"$answer\"\n"; my $header=Net::DNS::Header->new(\$answer); print "\$header=\"$header\"\n"; print "resolver state:\n"; $res->print; print "header strings from ->answer\n"; print $header->string; print "header authorative? "; print $header->aa . "\n"; print "header rcode? "; print $header->rcode; print "\n"; print "print rr from ->answer\n"; foreach my $rr ($answer->answer) { foreach my $key (keys %$rr) { print " $key -> $$rr{$key}\n"; } }
[guest - Thu Mar 31 10:23:19 2005]: Show quoted text
> Tried the following but everytime the rcode is NOTZONE i am expecting > NOERROR.
I forgot to tell you: I checked via tethereal -V on the Nameserver itself that it was sending the NOERROR flag. ;) Stefan
[guest - Thu Mar 31 10:36:16 2005]: Show quoted text
> [guest - Thu Mar 31 10:23:19 2005]: >
> > Tried the following but everytime the rcode is NOTZONE i am expecting > > NOERROR.
> I forgot to tell you: > I checked via tethereal -V on the Nameserver itself that it was sending > the NOERROR flag. ;) > > Stefan
If you look at the output of the script you see that the actual answer contains the proper RCODE. What happens is that you pass the wrong argument to the Header::new method. Try this: my $headerdata=($answer->header)->data; my $header=Net::DNS::Header->new(\$headerdata); instead of my $header=Net::DNS::Header->new(\$answer); I think there is no bug so I close the ticket. Good luck, --Olaf
And fo course $my header=$answer->header; would have worked as well.. --Olaf