Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Net::DNS::Resolver::Recurse issue

by gtech99 (Initiate)
on Jul 14, 2024 at 12:54 UTC ( [id://11160599]=note: print w/replies, xml ) Need Help??


in reply to Re: Net::DNS::Resolver::Recurse issue
in thread Net::DNS::Resolver::Recurse issue

I might add that indeed, the domain is misconfigured from multiple points of view.

1. Glue is missing

2. The non-glued NS is refusing queries

However, from what I read in the module's code, it should still work around this and circle back to the working NS

Right now my code works only if it falls by chance on the working NS

This is code from the module's source, I actually see it print "recover missing glue for .." in debug mode

sub _recurse { my ( $self, $query, $apex ) = @_; $self->_diag("using cached nameservers for $apex"); my $cache = $self->{persistent}->{$apex}; my @nslist = keys %$cache; my @glue = grep { $$cache{$_} } @nslist; my @noglue = grep { !$$cache{$_} } @nslist; my $reply; foreach my $ns ( @glue, @noglue ) { if ( my $iplist = $$cache{$ns} ) { $self->nameservers(@$iplist); } else { $self->_diag("recover missing glue for $ns"); next if substr( lc($ns), -length($apex) ) eq $apex; my @ip = $self->nameservers($ns); $$cache{$ns} = \@ip; } $query->header->id(undef); last if $reply = $self->SUPER::send($query); $$cache{$ns} = undef; # park non-responder } $self->_callback($reply); return unless $reply; my $zone = $self->_referral($reply) || return $reply; die '_recurse exceeded depth limit' if $self->{recurse_depth}++ > +50; my $qname = lc( ( $query->question )[0]->qname ); my $suffix = substr( $qname, -length($zone) ); return $zone eq $suffix ? $self->_recurse( $query, $zone ) : undef +; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11160599]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-09-20 07:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (25 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.