check if the answer from the *local* server is *authoritive*
authorHeiko Schlittermann (JUMPER) <hs@schlittermann.de>
Mon, 19 Jan 2015 10:53:06 +0100
changeset 28 396bb8f13f95
parent 27 134405c3299c
child 29 dcebfb4a011c
check if the answer from the *local* server is *authoritive*
dns-autoslave
--- a/dns-autoslave	Mon Jan 19 10:52:37 2015 +0100
+++ b/dns-autoslave	Mon Jan 19 10:53:06 2015 +0100
@@ -163,7 +163,8 @@
 	    next;
 	}
 
-	if ((new Net::DNS::Resolver (recurse => 0))->query($domain, "SOA")) {
+	if ($_ = (new Net::DNS::Resolver (nameservers => ['127.0.0.1'], recurse => 0))->query($domain, "SOA")
+	    and $_->header->aa) {
 	    $Seen{$domain} = time;
 	    warn "$msg OK(soa checked)\n";
 	    next;