Show
Ignore:
Timestamp:
03/20/03 14:29:29 (10 years ago)
Author:
ahu
Message:

fixes for ns-in-answer-section

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pdns/pdns/packethandler.cc

    r161 r164  
    155155 
    156156  if (p->qclass == 3 && p->qtype.getName() == "HINFO") { 
    157     rr.content = "PowerDNS $Id: packethandler.cc,v 1.12 2003/03/17 13:44:53 ahu Exp $"; 
     157    rr.content = "PowerDNS $Id: packethandler.cc,v 1.13 2003/03/20 13:29:29 ahu Exp $"; 
    158158    rr.ttl = 5; 
    159159    rr.qname=target; 
     
    171171  DNSResourceRecord rr; 
    172172  if(p->qtype.getCode()==QType::TXT && target=="version.bind") {// TXT 
    173     rr.content="Served by POWERDNS "VERSION" $Id: packethandler.cc,v 1.12 2003/03/17 13:44:53 ahu Exp $"; 
     173    rr.content="Served by POWERDNS "VERSION" $Id: packethandler.cc,v 1.13 2003/03/20 13:29:29 ahu Exp $"; 
    174174    rr.ttl=5; 
    175175    rr.qname=target; 
     
    304304    DLOG(L<<Logger::Warning<<"This packet needs additional processing!"<<endl); 
    305305 
    306     vector<DNSResourceRecord> arrs=r->getAPRecords(); 
    307     for(vector<DNSResourceRecord>::const_iterator i=arrs.begin(); 
     306    vector<DNSResourceRecord *> arrs=r->getAPRecords(); 
     307    for(vector<DNSResourceRecord *>::const_iterator i=arrs.begin(); 
    308308        i!=arrs.end(); 
    309309        ++i) { 
    310310       
    311       if(r->d.aa && i->qtype.getCode()==QType::NS && !B.getSOA(i->qname,sd)) // drop AA in case of non-SOA-level NS answer 
     311      if((*i)->qtype.getCode()==QType::NS && !B.getSOA((*i)->qname,sd)) { // drop AA in case of non-SOA-level NS answer 
    312312        r->d.aa=false; 
     313        (*i)->d_place=DNSResourceRecord::AUTHORITY; 
     314      } 
    313315 
    314316      QType qtypes[2]; 
    315317      qtypes[0]="A"; qtypes[1]="AAAA"; 
    316318      for(int n=0;n < d_doIPv6AdditionalProcessing + 1; ++n) { 
    317         B.lookup(qtypes[n],i->content,p);   
     319        B.lookup(qtypes[n],(*i)->content,p);   
    318320        bool foundOne=false; 
    319321        while(B.get(rr)) { 
    320322          foundOne=true; 
    321           if(rr.domain_id!=i->domain_id && arg()["out-of-zone-additional-processing"]=="no") { 
    322             DLOG(L<<Logger::Warning<<"Not including out-of-zone additional processing of "<<i->qname<<" ("<<rr.qname<<")"<<endl); 
     323          if(rr.domain_id!=(*i)->domain_id && arg()["out-of-zone-additional-processing"]=="no") { 
     324            DLOG(L<<Logger::Warning<<"Not including out-of-zone additional processing of "<<(*i)->qname<<" ("<<rr.qname<<")"<<endl); 
    323325            continue; // not adding out-of-zone additional data 
    324326          } 
     
    332334            try { 
    333335              Resolver resolver; 
    334               resolver.resolve(arg()["recursor"],i->content.c_str(),QType::A); 
     336              resolver.resolve(arg()["recursor"],(*i)->content.c_str(),QType::A); 
    335337              Resolver::res_t res=resolver.result(); 
    336338              for(Resolver::res_t::const_iterator j=res.begin();j!=res.end();++j) {