From: Bert Hubert Date: Sun, 20 May 2007 21:14:30 +0000 (+0000) Subject: final fix hopefully for fancy record any queries of wildcard records X-Git-Tag: rec-3.1.7.1~187 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1c3e2d133498d21148270ab62d72c756e84105ad;p=pdns final fix hopefully for fancy record any queries of wildcard records git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1054 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/packethandler.cc b/pdns/packethandler.cc index 361094afc..44822a68a 100644 --- a/pdns/packethandler.cc +++ b/pdns/packethandler.cc @@ -275,6 +275,12 @@ int PacketHandler::doWildcardRecords(DNSPacket *p, DNSPacket *r, string &target) found=true; if((p->qtype.getCode()==QType::ANY || rr.qtype==p->qtype) || rr.qtype.getCode()==QType::CNAME) { rr.qname=target; + + if(d_doFancyRecords && p->qtype.getCode()==QType::ANY && (rr.qtype.getCode()==QType::URL || rr.qtype.getCode()==QType::CURL)) { + rr.content=arg()["urlredirector"]; + rr.qtype=QType::A; + } + r->addRecord(rr); // and add if(rr.qtype.getCode()==QType::CNAME) { if(target==rr.content) {