From: Aki Tuomi Date: Mon, 15 Jun 2015 10:48:44 +0000 (+0300) Subject: Use DNSName in Pipe backend X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~58^2~21^2~5^2~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d173a2a075396421f617e5f727689562c284560;p=thirdparty%2Fpdns.git Use DNSName in Pipe backend --- diff --git a/modules/pipebackend/pipebackend.cc b/modules/pipebackend/pipebackend.cc index 2d6e9b78f5..573defa661 100644 --- a/modules/pipebackend/pipebackend.cc +++ b/modules/pipebackend/pipebackend.cc @@ -109,11 +109,11 @@ PipeBackend::PipeBackend(const string &suffix) } } -void PipeBackend::lookup(const QType &qtype,const string &qname, DNSPacket *pkt_p, int zoneId) +void PipeBackend::lookup(const QType& qtype,const DNSName& qname, DNSPacket *pkt_p, int zoneId) { try { d_disavow=false; - if(d_regex && !d_regex->match(qname+";"+qtype.getName())) { + if(d_regex && !d_regex->match(qname.toStringNoDot()+";"+qtype.getName())) { if(::arg().mustDo("query-logging")) L<= 2) @@ -150,7 +150,7 @@ void PipeBackend::lookup(const QType &qtype,const string &qname, DNSPacket *pkt_ d_qname=qname; } -bool PipeBackend::list(const string &target, int inZoneId, bool include_disabled) +bool PipeBackend::list(const DNSName& target, int inZoneId, bool include_disabled) { try { d_disavow=false; @@ -159,7 +159,7 @@ bool PipeBackend::list(const string &target, int inZoneId, bool include_disabled // type qname qclass qtype id ip-address if (d_abiVersion >= 4) - query<<"AXFR\t"< d_coproc; - string d_qname; + DNSName d_qname; QType d_qtype; Regex* d_regex; string d_regexstr;