]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
pipe: SERVFAIL when needed: 4319/head
authorPieter Lexis <pieter.lexis@powerdns.com>
Tue, 16 Aug 2016 13:51:47 +0000 (15:51 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Tue, 16 Aug 2016 13:51:47 +0000 (15:51 +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

modules/pipebackend/pipebackend.cc

index 1154bba77a13e7e8f07b2bf0e3dc9e0714d3328d..b825359a70633947b9faa325bb83413c1f6e8817 100644 (file)
@@ -324,10 +324,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;
 }