Commit d1cc210d authored by Andreas Gustafsson's avatar Andreas Gustafsson
Browse files

RT #927 fix from Bob:

 759.   [bug]           The resolver didn't turn off "avoid fetches" mode
                        when restarting, possibly causing resolution
                        to fail when it should not.  This bug only affected
                        platforms which support both IPv4 and IPv6. [RT #927]

 758.   [bug]           The "avoid fetches" code did not treat negative
                        cache entries correctly, causing fetches that would
                        be useful to be avoided.  This bug only affected
                        platforms which support both IPv4 and IPv6. [RT #927]
parent 088a2508
759. [bug] The resolver didn't turn off "avoid fetches" mode
when restarting, possibly causing resolution
to fail when it should not. This bug only affected
platforms which support both IPv4 and IPv6. [RT #927]
758. [bug] The "avoid fetches" code did not treat negative
cache entries correctly, causing fetches that would
be useful to be avoided. This bug only affected
platforms which support both IPv4 and IPv6. [RT #927]
757. [func] Log zone transfers.
756. [bug] dns_zone_load() could "return" success when no master
......@@ -14,7 +24,8 @@
address on a system that doesn't support IPv6.
[RT #917]
752. [func] Correct bad tv_usec elements returned by gettimeofday().
752. [func] Correct bad tv_usec elements returned by
gettimeofday().
751. [func] Log successful zone loads / transfers. [RT #898]
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: adb.c,v 1.170 2001/02/09 00:13:52 gson Exp $ */
/* $Id: adb.c,v 1.171 2001/02/28 20:51:22 gson Exp $ */
/*
* Implementation notes
......@@ -2396,7 +2396,7 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
dns_adbfind_t *find;
dns_adbname_t *adbname;
int bucket;
isc_boolean_t want_event, start_at_root, alias;
isc_boolean_t want_event, start_at_root, alias, have_address;
isc_result_t result;
unsigned int wanted_addresses;
unsigned int wanted_fetches;
......@@ -2628,8 +2628,13 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
}
fetch:
if ((WANT_INET(wanted_addresses) && NAME_HAS_V4(adbname)) ||
(WANT_INET6(wanted_addresses) && NAME_HAS_V6(adbname)))
have_address = ISC_TRUE;
else
have_address = ISC_FALSE;
if (wanted_fetches != 0 &&
(!FIND_AVOIDFETCHES(find) || wanted_addresses == wanted_fetches)) {
! (FIND_AVOIDFETCHES(find) && have_address)) {
/*
* We're missing at least one address family. Either the
* caller hasn't instructed us to avoid fetches, or we don't
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: adb.h,v 1.63 2001/02/09 00:13:55 gson Exp $ */
/* $Id: adb.h,v 1.64 2001/02/28 20:47:36 gson Exp $ */
#ifndef DNS_ADB_H
#define DNS_ADB_H 1
......@@ -144,8 +144,12 @@ struct dns_adbfind {
* if one will actually be generated.
*
* _AVOIDFETCHES:
* If set, fetches will not be generated unless no addresses are
* available in any of the address families requested.
*
* _STARTATROOT:
* Fetches will start at the root nameservers, instead of the closest
* ancestor. This is useful for reestablishing glue that has expired.
*
* _GLUEOK:
* _HINTOK:
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: resolver.c,v 1.204 2001/02/21 05:16:44 bwelling Exp $ */
/* $Id: resolver.c,v 1.205 2001/02/28 20:47:34 gson Exp $ */
#include <config.h>
......@@ -1447,8 +1447,20 @@ fctx_getaddresses(fetchctx_t *fctx) {
* Normal nameservers.
*/
stdoptions = DNS_ADBFIND_WANTEVENT | DNS_ADBFIND_EMPTYEVENT |
DNS_ADBFIND_AVOIDFETCHES;
stdoptions = DNS_ADBFIND_WANTEVENT | DNS_ADBFIND_EMPTYEVENT;
if (fctx->restarts == 1) {
/*
* To avoid sending out a flood of queries likely to
* result in NXRRSET, we suppress fetches for address
* families we don't have the first time through,
* provided that we have addresses in some family we
* can use.
*
* We don't want to set this option all the time, since
* if fctx->restarts > 1, we've clearly been having trouble
* with the addresses we had, so getting more could help. */
stdoptions |= DNS_ADBFIND_AVOIDFETCHES;
}
if (res->dispatchv4 != NULL)
stdoptions |= DNS_ADBFIND_INET;
if (res->dispatchv6 != NULL)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment