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. > 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. > 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 ) { # 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. -- Augie Schwer - au...@schwer.us - http://schwer.us Key fingerprint = 9815 AE19 AFD1 1FE7 5DEE 2AC3 CB99 2784 27B0 C072 _______________________________________________ mon mailing list mon@linux.kernel.org http://linux.kernel.org/mailman/listinfo/mon