From: Wouter Wijngaards Date: Thu, 19 Aug 2010 13:00:21 +0000 (+0000) Subject: - Fix bug#321: resolution of rs.ripe.net artifacts with 0x20. X-Git-Tag: release-1.4.7rc1~106 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89845bca0341406d5469ffd107b31a255cfb4516;p=thirdparty%2Funbound.git - Fix bug#321: resolution of rs.ripe.net artifacts with 0x20. Delegpt structures checked for duplicates always. No more nameserver lookups generated when depth is full anyway. git-svn-id: file:///svn/unbound/trunk@2219 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 0aecf4de5..65debe196 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,8 @@ +19 August 2010: Wouter + - Fix bug#321: resolution of rs.ripe.net artifacts with 0x20. + Delegpt structures checked for duplicates always. + No more nameserver lookups generated when depth is full anyway. + 18 August 2010: Wouter - Fix bug#322: configure does not respect CFLAGS on Solaris. Pass CFLAGS="-xO4 -xtarget=generic" on the configure command line diff --git a/iterator/iter_delegpt.c b/iterator/iter_delegpt.c index 28dac7c76..33f5bb492 100644 --- a/iterator/iter_delegpt.c +++ b/iterator/iter_delegpt.c @@ -361,10 +361,10 @@ delegpt_from_message(struct dns_msg* msg, struct regional* region) continue; if(ntohs(s->rk.type) == LDNS_RR_TYPE_A) { - if(!delegpt_add_rrset_A(dp, region, s, 0, 0)) + if(!delegpt_add_rrset_A(dp, region, s, 0, 1)) return NULL; } else if(ntohs(s->rk.type) == LDNS_RR_TYPE_AAAA) { - if(!delegpt_add_rrset_AAAA(dp, region, s, 0, 0)) + if(!delegpt_add_rrset_AAAA(dp, region, s, 0, 1)) return NULL; } } diff --git a/iterator/iterator.c b/iterator/iterator.c index e61829762..f170e78b4 100644 --- a/iterator/iterator.c +++ b/iterator/iterator.c @@ -1300,6 +1300,9 @@ query_for_targets(struct module_qstate* qstate, struct iter_qstate* iq, int missing; int toget = 0; + if(iq->depth == ie->max_dependency_depth) + return 0; + iter_mark_cycle_targets(qstate, iq->dp); missing = (int)delegpt_count_missing_targets(iq->dp); log_assert(maxtargets != 0); /* that would not be useful */ @@ -1432,6 +1435,10 @@ processLastResort(struct module_qstate* qstate, struct iter_qstate* iq, return 0; /* and wait for them */ } } + if(iq->depth == ie->max_dependency_depth) { + verbose(VERB_QUERY, "maxdepth and need more nameservers, fail"); + return error_response_cache(qstate, id, LDNS_RCODE_SERVFAIL); + } /* mark cycle targets for parent-side lookups */ iter_mark_pside_cycle_targets(qstate, iq->dp); /* see if we can issue queries to get nameserver addresses */