Changeset 1475

Show
Ignore:
Timestamp:
12/27/09 15:22:45 (3 months ago)
Author:
ahu
Message:

prevent duplicate SOA from appearing in case a response contains a CNAME and a SOA
zero the 'priority' field just to be sure in lwres.cc response handling

Location:
trunk/pdns/pdns
Files:
2 modified

Legend:

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

    r1472 r1475  
    5858    Never throws!  
    5959 */ 
    60 int asyncresolve(const ComboAddress& ip, const string& domain, int type, bool doTCP, bool sendRDQuery, int EDNS0Level, struct timeval* now, LWResult *lwr) 
     60int asyncresolve(const ComboAddress& ip, const string& domain, int type, bool doTCP, bool sendRDQuery, int EDNS0Level, struct timeval* now, LWResultResult *lwr) 
    6161{ 
    6262  int len;  
     
    184184    for(MOADNSParser::answers_t::const_iterator i=mdp.d_answers.begin(); i!=mdp.d_answers.end(); ++i) {           
    185185      DNSResourceRecord rr; 
     186      rr.priority = 0; 
    186187      rr.qtype=i->first.d_type; 
    187188      rr.qname=i->first.d_label; 
  • trunk/pdns/pdns/syncres.cc

    r1473 r1475  
    957957            if(rr.qtype.getCode() == QType::NS) // people fiddle with the case 
    958958              rr.content=toLower(rr.content); // this must stay! (the cache can't be case-insensitive on the RHS of records) 
     959             
    959960            tcache[make_pair(i->qname,i->qtype)].insert(rr); 
    960961          } 
     
    10301031           lwr.d_rcode==RCode::NoError) { 
    10311032          LOG<<prefix<<qname<<": got negative caching indication for '"<< (qname+"|"+i->qtype.getName()+"'") <<endl; 
    1032           ret.push_back(*i); 
     1033          if(!newtarget.empty()) 
     1034            ret.push_back(*i); 
    10331035           
    10341036          NegCacheEntry ne;