mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
Fixup bug in response type calculation.
git-svn-id: file:///svn/unbound/trunk@527 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
24aad68487
commit
568f0699dc
2 changed files with 18 additions and 1 deletions
|
|
@ -5,6 +5,11 @@
|
|||
- This makes a key-prime succeed in validator, with DS or DNSKEY as
|
||||
trust-anchor.
|
||||
- fixup canonical compare byfield routine, fix bug and also neater.
|
||||
- fixed iterator response type classification for queries of type
|
||||
ANY and NS.
|
||||
dig ANY gives sometimes NS rrset in AN and NS section, and parser
|
||||
removes the NS section duplicate. dig NS gives sometimes the NS
|
||||
in the answer section, as referral.
|
||||
|
||||
15 August 2007: Wouter
|
||||
- crypto calls to verify signatures.
|
||||
|
|
|
|||
|
|
@ -138,6 +138,18 @@ response_type_from_server(struct dns_msg* msg, struct query_info* request,
|
|||
for(i=0; i<msg->rep->an_numrrsets; i++) {
|
||||
struct ub_packed_rrset_key* s = msg->rep->rrsets[i];
|
||||
|
||||
/* if the answer section has NS rrset, and qtype ANY
|
||||
* and the delegation is lower, and no CNAMEs followed,
|
||||
* this is a referral where the NS went to AN section */
|
||||
if((request->qtype == LDNS_RR_TYPE_ANY ||
|
||||
request->qtype == LDNS_RR_TYPE_NS) &&
|
||||
ntohs(s->rk.type) == LDNS_RR_TYPE_NS &&
|
||||
ntohs(s->rk.rrset_class) == request->qclass &&
|
||||
dname_strict_subdomain_c(s->rk.dname,
|
||||
origzone)) {
|
||||
return RESPONSE_TYPE_REFERRAL;
|
||||
}
|
||||
|
||||
/* If we have encountered an answer (before or
|
||||
* after a CNAME), then we are done! Note that
|
||||
* if qtype == CNAME then this will be noted as an
|
||||
|
|
|
|||
Loading…
Reference in a new issue