]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: Remove pdns.PASS and pdns.TRUNCATE 5739/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 27 Sep 2017 14:24:39 +0000 (16:24 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 27 Sep 2017 14:24:39 +0000 (16:24 +0200)
Those values are not documented in a recursor context, and does not
work as expected since `pdns.PASS` resulted in an immediate `ServFail`
and `pdns.TRUNCATE` in a strange status code being sent (showing
up as `RESERVED13` in `dig`).

pdns/lua-recursor4.cc
pdns/pdns_recursor.cc

index b05af21a94fc79d52e52d47bf6bed1137edeb588..bdfa7d54b120a913493aa97c556bf1c45891d69e 100644 (file)
@@ -464,8 +464,7 @@ RecursorLua4::RecursorLua4(const std::string& fname)
     });
   typedef vector<pair<string, int> > in_t;
   vector<pair<string, boost::variant<int, in_t, struct timeval* > > >  pd{
-    {"PASS", (int)PolicyDecision::PASS}, {"DROP",  (int)PolicyDecision::DROP},
-    {"TRUNCATE", (int)PolicyDecision::TRUNCATE}
+    {"DROP",  (int)PolicyDecision::DROP}
   };
 
   vector<pair<string, int> > rcodes = {{"NOERROR",  RCode::NoError  },
index f733f81e9d05777c01837f5a99beb2bd06d33580..5cabd508162e431b455425bee6119ac2f03037b5 100644 (file)
@@ -1015,7 +1015,7 @@ static void startDoResolve(void *p)
       dc=0;
       return;
     }
-    if(tracedQuery || res == PolicyDecision::PASS || res == RCode::ServFail || pw.getHeader()->rcode == RCode::ServFail)
+    if(tracedQuery || res == -1 || res == RCode::ServFail || pw.getHeader()->rcode == RCode::ServFail)
     { 
       string trace(sr.getTrace());
       if(!trace.empty()) {
@@ -1028,7 +1028,7 @@ static void startDoResolve(void *p)
       }
     }
 
-    if(res == PolicyDecision::PASS) {  // XXX what does this MEAN? Why servfail on PASS?
+    if(res == -1) {
       pw.getHeader()->rcode=RCode::ServFail;
       // no commit here, because no record
       g_stats.servFails++;