* Augie Schwer wrote:
> On Mon, May 17, 2010 at 4:04 PM, Nathan Gibbs <nat...@cmpublishers.com> wrote:
>> * Augie Schwer wrote:
>>> so running this monitor on an IPv4 only host, may give you some false
>>> negatives.
>> So if I query the IPv6 only NS from an IPv4 only host we get an error,
>> although nothing is wrong. Do I got that right?
> 
> Yes, Net::DNS::Resolver will behave as if you gave it an empty string
> for the name server to query.
> 

All Righty.

>> Is there a TLD that has an IPv6 only NS for testing purposes?
>> I tested the monitor on .com .net .org and .info, so they don't have IPv6 
>> only
>> NS's.
> 
> The .us TLD has one of its six name servers that only has an IPv6 address.

OK, Thanks.

> 
>> I've already done a bit of code cleanup, and was planning another release
>> soon, so it would be great if I could get this issue fixed.
> 
> You'll want to loop through your list of TLD name servers and remove
> ones from the list that don't have an "A" record:
> 
> my $res = Net::DNS::Resolver->new;
> my $que = $res->query($tldnsname,'A');
> if ( $que )

When there is no A record if ( !$que ) is always true.
So I never had to actually check for the A record.

Maybe that is because my system is IPv4 only.
I know enough about Net::DNS::Resolver to be dangerous, as I've already
demonstrated.
:-)

> {
>     # leave loop after we found one good one.
>     my @answer = $que->answer;
>     last if $answer[0]->type eq 'A';
> }
> 
> I know that's out of context, but you get the idea.
> 
> The other thing to consider is making this all optional -- a IPv6
> enabled mon host operator may not want you to force IPv4 on them.

Correct.  The new version which just went up has a -4 option to enable the
check.  Otherwise it acts like the previous version and tries all the TLD NS's.

Thanks for your help.

-- 
Sincerely,

Nathan Gibbs

Systems Administrator
Christ Media
http://www.cmpublishers.com


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
mon mailing list
mon@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/mon

Reply via email to