[Pdns-users] Feedback on the recursor 3.0 requested + 3.0.1

Kenneth Marshall ktm at it.is.rice.edu
Wed Apr 26 19:01:29 UTC 2006


On Wed, Apr 26, 2006 at 11:01:43AM +0200, bert hubert wrote:
> Users of UltraSPARC and other big-endian platforms need to make this tiny
> patch to dnswriter.cc. Currently, MX records are all listed with 0 priority
> otherwise, with the same holding for SRV records.
> 
> Thanks to Kenneth for noticing.
> 
> This fix is not needed for intel/amd users.
> 
> Index: trunk/pdns/pdns/dnswriter.cc
> ===================================================================
> --- trunk/pdns/pdns/dnswriter.cc (revision 699)
> +++ trunk/pdns/pdns/dnswriter.cc (revision 773)
> @@ -102,5 +102,5 @@
>  void DNSPacketWriter::xfr16BitInt(uint16_t val)
>  {
> -  int rval=htons(val);
> +  uint16_t rval=htons(val);
>    uint8_t* ptr=reinterpret_cast<uint8_t*>(&rval);
>    d_record.insert(d_record.end(), ptr, ptr+2);
> 
> 
> 
> -- 
> http://www.PowerDNS.com      Open source, database driven DNS Software 
> http://netherlabs.nl              Open and Closed source services
> 

Mr. Hubert,

The patch fixed the problem and the Solaris pdns_recursor works very
well. I am trying to see if I can use the recursor instead of bind
for some Active Directory binds that took a long, long time when
using the pdns_recursor instead of bind. The only difference appears
to be the lookup of the A records/IP for each host returned. I modeled
the change after your version for MX records. Here is the change:

> /usr/site/diffutils/bin/diff -u syncres.cc syncres.cc.DIST                     
--- syncres.cc  2006-04-26 08:21:24.916203000 -0500
+++ syncres.cc.DIST     2006-04-25 13:04:35.961388000 -0500
@@ -683,29 +683,6 @@
       }
     }
   
-#ifdef SRV_HOST_A
-  // Look up host A record for SRV records like Active Directory
-  for(vector<DNSResourceRecord>::const_iterator k=ret.begin();k!=ret.end();++k) 
-    if((k->d_place==DNSResourceRecord::ANSWER && k->qtype==QType(QType::SRV)) || 
-       ((k->d_place==DNSResourceRecord::AUTHORITY || k->d_place==DNSResourceRecord::ANSWER) && k->qtype==QType(QType::NS))) {
-      LOG<<d_prefix<<qname<<": record '"<<k->content<<"|"<<k->qtype.getName()<<"' needs IP for additional processing"<<endl;
-      set<GetBestNSAnswer>beenthere;
-      if(k->qtype==QType(QType::SRV)) {
-       pair<string,string> prefServer=splitField(k->content,' ');
-       pair<string,string> weightServer=splitField(prefServer.second,' ');
-       pair<string,string> portServer=splitField(weightServer.second,' ');
-       doResolve(portServer.second, QType(QType::A), addit, 1, beenthere);
-       if(*l_doIPv6AP)
-         doResolve(portServer.second, QType(QType::AAAA), addit, 1, beenthere);
-      }
-      else {
-       doResolve(k->content,QType(QType::A),addit,1,beenthere);
-       if(*l_doIPv6AP)
-         doResolve(k->content,QType(QType::AAAA),addit,1,beenthere);
-      }
-    }
-#endif
-  
   for(vector<DNSResourceRecord>::iterator k=addit.begin();k!=addit.end();++k) {
     if(k->qtype.getCode()==QType::A || k->qtype.getCode()==QType::AAAA) {
       k->d_place=DNSResourceRecord::ADDITIONAL;


It returns the appropriate values, but I am not sure if it has a memory
leak or some other weird behavior. If you see any problems right off, please
let me know. I will give you an update on the performance testing as soon as
I am finished.

Ken


More information about the Pdns-users mailing list