Skip Menu |

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

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

People
Owner: rt-cpan [...] triv.org
Requestors: rnspayne [...] the-paynes.com
Cc:
AdminCc:

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



Subject: recursion desired flag not maintained.
This code, running on Perl 5.8.0 appears to lose the recursion desired (RD) flag: print STDERR "Net::DNS Version: ", Net::DNS->version(), "\n"; my $resolver = Net::DNS::Resolver->new; $resolver->nameservers("127.0.0.1"); my($name)="example.zone"; my($packet) = Net::DNS::Packet->new($name); $packet->header->rd(0); print STDERR "RD flag: ", $packet->header->rd(), "\n"; my($query) = $resolver->send($packet); print STDERR "RD flag: ", $query->header->rd(), "\n"; Output: Net::DNS Version: 0.34 RD flag: 0 RD flag: 1 Running the same query with dig: dig +norec example.zone @127.0.0.1 shows that the name server returns the RD flag=0.
Date: Mon, 19 May 2003 00:59:43 -0400 (EDT)
From: Chris Reinhardt <ctriv [...] dyndns.org>
To: Guest via RT <bug-Net-DNS [...] rt.cpan.org>
Subject: Re: [cpan #2602] recursion desired flag not maintained.
RT-Send-Cc:
On Mon, 19 May 2003, Guest via RT wrote: Show quoted text
> > print STDERR "Net::DNS Version: ", Net::DNS->version(), "\n"; > my $resolver = Net::DNS::Resolver->new; > $resolver->nameservers("127.0.0.1"); > my($name)="example.zone"; > my($packet) = Net::DNS::Packet->new($name); > $packet->header->rd(0); > print STDERR "RD flag: ", $packet->header->rd(), "\n"; > my($query) = $resolver->send($packet); > print STDERR "RD flag: ", $query->header->rd(), "\n"; > > Output: > Net::DNS Version: 0.34 > RD flag: 0 > RD flag: 1 > > Running the same query with dig: > dig +norec example.zone @127.0.0.1 > > shows that the name server returns the RD flag=0. >
You need to set recursion in your Resolver object. -- Chris Reinhardt ctriv@dyndns.org Systems Architect Dynamic DNS Network Services http://www.dyndns.org/