]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Remove the QType from the pipe-regex 2629/head
authorPieter Lexis <pieter.lexis@powerdns.com>
Tue, 7 Jul 2015 13:07:08 +0000 (15:07 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Fri, 10 Jul 2015 09:05:58 +0000 (11:05 +0200)
Fixes #2547 and headaches.

docs/markdown/authoritative/backend-pipe.md
modules/pipebackend/pipebackend.cc

index 4f4f3077c6a1b4268eb2136ecc09afdcd5ae35b8..dbd7a374a10738ebcc2592e36f804b0ad896a972 100644 (file)
@@ -62,23 +62,7 @@ Number of milliseconds to wait for an answer from the backend. If this time is e
 |:-|:-|
 |Type|String (a regex)|
 
-If set, only questions matching this regular expression are even sent to the backend. This makes sure that most of PowerDNS does not slow down if you you deploy a slow backend. A query for the A record of 'www.powerdns.com' would be presented to the regex as 'www.powerdns.com;A'. A matching regex would be '^www.powerdns.com;.*$'.
-
-To match only ANY and A queries for www.powerdns.com, use `^www.powerdns.com;(A|ANY)$`.
-
-## Deploying the PipeBackend with the BindBackend
-Included with the PDNS distribution is the example.pl backend which has knowledge of the example.com zone, just like the BindBackend. To install both, add the following to your `pdns.conf`:
-
-```
-launch=pipe,bind
-bind-example-zones
-pipe-command=location/of/backend.pl
-```
-
-Please adjust the [`pipe-command`](#pipe-command) statement to the location of the unpacked PDNS distribution. If your backend is slow, raise [`pipe-timeout`](#pipe-timeout) from its default of 2000ms. Now launch PDNS in monitor mode, and perform some queries. Note the difference with the earlier experiment where only the BindBackend was loaded. The PipeBackend is launched first and thus gets queried first. The sample backend.pl script knows about:
-
--   webserver.example.com A records pointing to 192.0.2.4, 192.0.2.5, 192.0.2.6
--   www.example.com CNAME pointing to webserver.example.com
+If set, only questions matching this regular expression are even sent to the backend. This makes sure that most of PowerDNS does not slow down if you you deploy a slow backend. A query for 'www.powerdns.com' would be presented to the regex as 'www.powerdns.com'. A matching regex would be '^www.powerdns.com$'.
 
 ## PipeBackend protocol
 
index 4723e4f965956d51c82f4f7953fcc66710471063..ca8aaf8f3f492202ac6d2e479972cc1b0ca61b3b 100644 (file)
@@ -113,9 +113,9 @@ void PipeBackend::lookup(const QType& qtype,const DNSName& qname, DNSPacket *pkt
 {
    try {
       d_disavow=false;
-      if(d_regex && !d_regex->match(qname.toStringNoDot()+";"+qtype.getName())) { 
+      if(d_regex && !d_regex->match(qname.toStingNoDot())) {
          if(::arg().mustDo("query-logging"))
-            L<<Logger::Error<<"Query for '"<<qname<<"' type '"<<qtype.getName()<<"' failed regex '"<<d_regexstr<<"'"<<endl;
+            L<<Logger::Error<<"Query for '"<<qname<<"' failed regex '"<<d_regexstr<<"'"<<endl;
          d_disavow=true; // don't pass to backend
       } else {
          ostringstream query;