From 1c3e2d133498d21148270ab62d72c756e84105ad Mon Sep 17 00:00:00 2001 From: Bert Hubert Date: Sun, 20 May 2007 21:14:30 +0000 Subject: [PATCH] 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 --- pdns/packethandler.cc | 6 ++++++ 1 file changed, 6 insertions(+) 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) { -- 2.49.0