[Pdns-users] CNAME confusion?!

bert hubert ahu at ds9a.nl
Sat Jan 15 14:27:31 UTC 2005


Ok, that probably won't work (patch issues, subversion migration leftover),
and a thinko.

Try replacing packethandler.cc in pdns 2.9.17 by the attached version.


On Sat, Jan 15, 2005 at 03:08:11PM +0100, bert hubert wrote:
> 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
> _______________________________________________
> Pdns-users mailing list
> Pdns-users at mailman.powerdns.com
> http://mailman.powerdns.com/mailman/listinfo/pdns-users

-- 
http://www.PowerDNS.com      Open source, database driven DNS Software 
http://lartc.org           Linux Advanced Routing & Traffic Control HOWTO
-------------- next part --------------
A non-text attachment was scrubbed...
Name: packethandler.cc
Type: text/x-c++src
Size: 23276 bytes
Desc: not available
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20050115/31aaf784/attachment.cc>


More information about the Pdns-users mailing list