From: Pieter Lexis Date: Tue, 28 Jun 2016 09:08:48 +0000 (+0200) Subject: logging and root-correctness in the pipe-backend X-Git-Tag: rec-4.0.0~22^2~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7834e181e9671c628b51e8aff7d705988b269d9e;p=thirdparty%2Fpdns.git logging and root-correctness in the pipe-backend --- diff --git a/docs/markdown/authoritative/backend-pipe.md b/docs/markdown/authoritative/backend-pipe.md index 854a5b04ba..b80958d49e 100644 --- a/docs/markdown/authoritative/backend-pipe.md +++ b/docs/markdown/authoritative/backend-pipe.md @@ -68,7 +68,8 @@ If this time is ever exceeded, the backend is declared dead and a new process is 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$'. +A query for 'www.powerdns.com' would be presented to the regex as 'www.powerdns.com', a matching regex would be `^www\.powerdns\.com$`. +**Note**: to match the root domain, use a dot, e.g. `^\.$` # PipeBackend protocol Questions come in over a file descriptor, by default standard input. diff --git a/modules/pipebackend/pipebackend.cc b/modules/pipebackend/pipebackend.cc index 7806093d42..7beed8e342 100644 --- a/modules/pipebackend/pipebackend.cc +++ b/modules/pipebackend/pipebackend.cc @@ -144,7 +144,7 @@ void PipeBackend::lookup(const QType& qtype,const DNSName& qname, DNSPacket *pkt try { launch(); d_disavow=false; - if(d_regex && !d_regex->match(qname.toStringNoDot())) { + if(d_regex && !d_regex->match(qname.toStringRootDot())) { if(::arg().mustDo("query-logging")) L<= 2) @@ -191,7 +191,7 @@ bool PipeBackend::list(const DNSName& target, int inZoneId, bool include_disable // type qname qclass qtype id ip-address if (d_abiVersion >= 4) - query<<"AXFR\t"<