mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-25 09:09:40 -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,7 +5,12 @@
|
||||||
- This makes a key-prime succeed in validator, with DS or DNSKEY as
|
- This makes a key-prime succeed in validator, with DS or DNSKEY as
|
||||||
trust-anchor.
|
trust-anchor.
|
||||||
- fixup canonical compare byfield routine, fix bug and also neater.
|
- 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
|
15 August 2007: Wouter
|
||||||
- crypto calls to verify signatures.
|
- crypto calls to verify signatures.
|
||||||
- unit test for rrsig verification.
|
- unit test for rrsig verification.
|
||||||
|
|
|
||||||
|
|
@ -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++) {
|
for(i=0; i<msg->rep->an_numrrsets; i++) {
|
||||||
struct ub_packed_rrset_key* s = msg->rep->rrsets[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
|
/* If we have encountered an answer (before or
|
||||||
* after a CNAME), then we are done! Note that
|
* after a CNAME), then we are done! Note that
|
||||||
* if qtype == CNAME then this will be noted as an
|
* if qtype == CNAME then this will be noted as an
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue