]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
pipe: SERVFAIL when needed: 4452/head
authorPieter Lexis <pieter.lexis@powerdns.com>
Tue, 16 Aug 2016 13:51:47 +0000 (15:51 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Sat, 10 Sep 2016 10:45:51 +0000 (12:45 +0200)
 * SERVFAIL, but don't restart the coprocess if we get a FAIL.
 * SERVFAIL if the coprocess sends something we don't understand.
   * In this case, restart the coprocess.

Closes #4308

(cherry picked from commit 6e0daabf5d93bd240c4c3a5ba5afcb843686f3b8)

modules/pipebackend/pipebackend.cc

index 987a9d74b9872c9338677ef8efb6b4a1b125ae28..98ec55297ec3c9f7c27ee8107766f52c1d8420dc 100644 (file)
@@ -340,10 +340,14 @@ bool PipeBackend::get(DNSResourceRecord &r)
         throw PDNSException("Coprocess backend sent incorrect response '"+line+"'");
     }
   }
+  catch (DBException &dbe) {
+    L<<Logger::Error<<kBackendId<<" "<<dbe.reason<<endl;
+    throw;
+  }
   catch (PDNSException &pe) {
     L<<Logger::Error<<kBackendId<<" "<<pe.reason<<endl;
     cleanup();
-    return false;
+    throw;
   }
   return true;
 }