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";
}
}