Fix changed OP code (NOTIFY instead of NS_NOTIFY_OP)
authorheiko
Thu, 14 Jul 2016 10:03:39 +0200
changeset 31 e127de596921
parent 30 b642c116da13
child 32 b3cd686b8cf6
Fix changed OP code (NOTIFY instead of NS_NOTIFY_OP) Add missing Net::DNS::Resolver
dns-autoslave
--- a/dns-autoslave	Mon Jan 19 10:55:12 2015 +0100
+++ b/dns-autoslave	Thu Jul 14 10:03:39 2016 +0200
@@ -6,6 +6,7 @@
 use File::Basename;
 use Net::Pcap;
 use Net::DNS::Packet;
+use Net::DNS::Resolver;
 use Fcntl ":flock";
 use AppConfig;
 use POSIX qw(SIGTERM);
@@ -149,7 +150,7 @@
     # Mapping, damit wir die Fälle, wo der Master eine falsche Absender-IP
     # nutzt (HA-Cluster) auch ordentlich behandeln können.
 
-    return unless $dns->header->opcode eq "NS_NOTIFY_OP";
+    return unless $dns->header->opcode =~ /^(?:NS_)?NOTIFY(?:_OP)?$/;
 
     # Das, was dort kommt, hat eine QUESTION und eine ANSWER, in der ANSWER steckt
     foreach my $q ($dns->question) {