]> granicus.if.org Git - pdns/commitdiff
ixfrdist: reverse no source and ACL checks
authorPieter Lexis <pieter.lexis@powerdns.com>
Fri, 13 Apr 2018 09:19:55 +0000 (11:19 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Fri, 13 Apr 2018 09:19:55 +0000 (11:19 +0200)
pdns/ixfrdist.cc

index 5285bf508988c6805ec9ae41adc47f6ad1de810a..e9e7c2f9109a7e2ce8293b998c867b3c441d9cd4 100644 (file)
@@ -531,13 +531,13 @@ void handleUDPRequest(int fd, boost::any&) {
     return;
   }
 
-  if (!allowedByACL(saddr)) {
-    g_log<<Logger::Warning<<"UDP query from "<<saddr.toString()<<" is not allowed, dropping"<<endl;
+  if (saddr == ComboAddress("0.0.0.0", 0)) {
+    g_log<<Logger::Warning<<"Could not determine source of message"<<endl;
     return;
   }
 
-  if (saddr == ComboAddress("0.0.0.0", 0)) {
-    g_log<<Logger::Warning<<"Could not determine source of message"<<endl;
+  if (!allowedByACL(saddr)) {
+    g_log<<Logger::Warning<<"UDP query from "<<saddr.toString()<<" is not allowed, dropping"<<endl;
     return;
   }
 
@@ -578,14 +578,14 @@ void handleTCPRequest(int fd, boost::any&) {
     return;
   }
 
-  if (!allowedByACL(saddr)) {
-    g_log<<Logger::Warning<<"TCP query from "<<saddr.toString()<<" is not allowed, dropping"<<endl;
-    close(cfd);
+  if (saddr == ComboAddress("0.0.0.0", 0)) {
+    g_log<<Logger::Warning<<"Could not determine source of message"<<endl;
     return;
   }
 
-  if (saddr == ComboAddress("0.0.0.0", 0)) {
-    g_log<<Logger::Warning<<"Could not determine source of message"<<endl;
+  if (!allowedByACL(saddr)) {
+    g_log<<Logger::Warning<<"TCP query from "<<saddr.toString()<<" is not allowed, dropping"<<endl;
+    close(cfd);
     return;
   }