[Pdns-users] CNAME confusion?!
bert hubert
ahu at ds9a.nl
Sat Jan 15 14:08:11 UTC 2005
Can you try this patch? It is entirely untested, but it might solve the
problem. Wiebren, your problem too I think.
Index: packethandler.cc
===================================================================
--- packethandler.cc (revision 276)
+++ packethandler.cc (working copy)
@@ -154,7 +154,7 @@
DNSResourceRecord rr;
if (p->qclass == 3 && p->qtype.getName() == "HINFO") {
- rr.content = "PowerDNS $Id: packethandler.cc,v 1.27 2005/01/11 19:41:11 ahu Exp $";
+ rr.content = "PowerDNS $Id$";
rr.ttl = 5;
rr.qname=target;
rr.qtype=13; // hinfo
@@ -174,7 +174,7 @@
const string mode=arg()["version-string"];
if(p->qtype.getCode()==QType::TXT && target=="version.bind") {// TXT
if(mode.empty() || mode=="full")
- rr.content="Served by POWERDNS "VERSION" $Id: packethandler.cc,v 1.27 2005/01/11 19:41:11 ahu Exp $";
+ rr.content="Served by POWERDNS "VERSION" $Id$";
else if(mode=="anonymous") {
r->setRcode(RCode::ServFail);
return 1;
@@ -353,8 +353,9 @@
B.lookup(QType(QType::ANY),target,p);
bool shortcut=p->qtype.getCode()!=QType::SOA && p->qtype.getCode()!=QType::ANY;
-
+ unsigned hits=0;
while(B.get(rr)) {
+ hits++;
if(!rfound && rr.qtype.getCode()==QType::CNAME) {
found=true;
r->addRecord(rr);
@@ -365,7 +366,7 @@
r->addRecord(rr);
}
}
- if(rfound)
+ if(hits || rfound)
return 1; // ANY lookup found the right answer immediately
if(found) {
--
http://www.PowerDNS.com Open source, database driven DNS Software
http://lartc.org Linux Advanced Routing & Traffic Control HOWTO
More information about the Pdns-users
mailing list