From 2b31bf02b8422bd0b439c282d097492c606f779c Mon Sep 17 00:00:00 2001 From: Bert Hubert Date: Sat, 25 Feb 2012 18:07:39 +0000 Subject: [PATCH] remove a slab of dead code git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2418 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- pdns/packethandler.cc | 84 ------------------------------------------- 1 file changed, 84 deletions(-) diff --git a/pdns/packethandler.cc b/pdns/packethandler.cc index 9f80e7cae..5faff7878 100644 --- a/pdns/packethandler.cc +++ b/pdns/packethandler.cc @@ -715,90 +715,6 @@ bool PacketHandler::doDNSSECProcessing(DNSPacket *p, DNSPacket *r) return false; } -#if 0 -/* returns 1 if everything is done & ready, 0 if the search should continue, 2 if a 'NO-ERROR' response should be generated */ -int PacketHandler::makeCanonic(DNSPacket *p, DNSPacket *r, string &target) -{ - DNSResourceRecord rr; - - bool found=false, rfound=false; - - if(p->qtype.getCode()!=QType::CNAME && !d_doCNAME) - return 0; - - // Traverse a CNAME chain if needed - for(int numloops=0;;numloops++) { - if(numloops==10) { - L<setRcode(2); - return 1; - } - - B.lookup(QType(QType::ANY),target,p); - - bool shortcut=p->qtype.getCode()!=QType::SOA && p->qtype.getCode()!=QType::ANY; - int hits=0; - bool relevantNS=false; - bool sawDS=false; - bool crossedZoneCut = false; - while(B.get(rr)) { - if(rr.qtype.getCode() == QType::NS && p->qtype.getCode() != QType::NS) { // possible retargeting - relevantNS=true; - } - - if(rr.qtype.getCode()==QType::DS && p->qtype.getCode() == QType::NS && p->d_dnssecOk) { - sawDS = true; - r->addRecord(rr); - } - - if(rr.qtype.getCode()!=QType::NS || p->qtype.getCode()==QType::NS) - hits++; - if(!rfound && rr.qtype.getCode()==QType::CNAME) { - found=true; - r->addRecord(rr); - target=rr.content; // for retargeting - } - if(shortcut && !found && rr.qtype==p->qtype) { - if(!rr.auth) { - // no idea why this if is here - } - - rfound=true; - r->addRecord(rr); - } - } - - if(crossedZoneCut) { - DLOG(L<<"Should return NS records, and this A/AAAA record in the additional section.."<qtype.getCode() == QType::NS && p->d_dnssecOk && rfound) { - addNSECX(p, r, p->qdomain, "", 2); // make it 'official' that we have no DS - } - - if(hits && !relevantNS && !found && !rfound && shortcut ) { // XXX FIXME !numloops. we found matching qnames but not a qtype - DLOG(L<<"Found matching qname, but not the qtype"<qtype.getCode()==QType::CNAME) // they really wanted a CNAME! - return 1; - DLOG(L<<"Looping because of a CNAME to "<