Changeset 1189
- Timestamp:
- 06/10/08 21:49:33 (4 months ago)
- Files:
-
- trunk/pdns/pdns/syncres.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/pdns/pdns/syncres.cc
r1168 r1189 582 582 }; 583 583 584 584 static bool magicAddrMatch(const QType& query, const QType& answer) 585 { 586 if(query.getCode() != QType::ADDR) 587 return false; 588 return answer.getCode() == QType::A || answer.getCode() == QType::AAAA; 589 } 585 590 586 591 /** returns -1 in case of no results, rcode otherwise */ … … 674 679 TryTCP: 675 680 if(doTCP) { 681 LOG<<prefix<<qname<<": using TCP with "<< remoteIP->toStringWithPort() <<endl; 676 682 s_tcpoutqueries++; d_tcpoutqueries++; 677 683 } … … 820 826 // for ANY answers we *must* have an authoritive answer 821 827 else if(i->d_place==DNSResourceRecord::ANSWER && !Utility::strcasecmp(i->qname.c_str(),qname.c_str()) && 822 (i->qtype==qtype || 823 ( 824 lwr.d_aabit && 825 ( qtype == QType(QType::ADDR) && (i->qtype.getCode()==QType::A || i->qtype.getCode()==QType::AAAA) ) || qtype==QType(QType::ANY) 826 ) 827 ) 828 ) { 829 828 ( 829 i->qtype==qtype || (lwr.d_aabit && (qtype==QType(QType::ANY) || magicAddrMatch(qtype, i->qtype) ) ) 830 ) 831 ) 832 { 833 830 834 LOG<<prefix<<qname<<": answer is in: resolved to '"<< i->content<<"|"<<i->qtype.getName()<<"'"<<endl; 831 835