]> granicus.if.org Git - pdns/commitdiff
final fix hopefully for fancy record any queries of wildcard records
authorBert Hubert <bert.hubert@netherlabs.nl>
Sun, 20 May 2007 21:14:30 +0000 (21:14 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Sun, 20 May 2007 21:14:30 +0000 (21:14 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1054 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/packethandler.cc

index 361094afc30fa41413aaa941a62cac19650b39e2..44822a68ada6c4e0694b67f79b98418c693f2aac 100644 (file)
@@ -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) {