mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-02 07:35:26 +00:00
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]
This commit is contained in:
13
CHANGES
13
CHANGES
@@ -1,3 +1,13 @@
|
|||||||
|
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.
|
757. [func] Log zone transfers.
|
||||||
|
|
||||||
756. [bug] dns_zone_load() could "return" success when no master
|
756. [bug] dns_zone_load() could "return" success when no master
|
||||||
@@ -14,7 +24,8 @@
|
|||||||
address on a system that doesn't support IPv6.
|
address on a system that doesn't support IPv6.
|
||||||
[RT #917]
|
[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]
|
751. [func] Log successful zone loads / transfers. [RT #898]
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* 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
|
* 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_adbfind_t *find;
|
||||||
dns_adbname_t *adbname;
|
dns_adbname_t *adbname;
|
||||||
int bucket;
|
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;
|
isc_result_t result;
|
||||||
unsigned int wanted_addresses;
|
unsigned int wanted_addresses;
|
||||||
unsigned int wanted_fetches;
|
unsigned int wanted_fetches;
|
||||||
@@ -2628,8 +2628,13 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
|
|||||||
}
|
}
|
||||||
|
|
||||||
fetch:
|
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 &&
|
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
|
* We're missing at least one address family. Either the
|
||||||
* caller hasn't instructed us to avoid fetches, or we don't
|
* caller hasn't instructed us to avoid fetches, or we don't
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* 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
|
#ifndef DNS_ADB_H
|
||||||
#define DNS_ADB_H 1
|
#define DNS_ADB_H 1
|
||||||
@@ -144,8 +144,12 @@ struct dns_adbfind {
|
|||||||
* if one will actually be generated.
|
* if one will actually be generated.
|
||||||
*
|
*
|
||||||
* _AVOIDFETCHES:
|
* _AVOIDFETCHES:
|
||||||
|
* If set, fetches will not be generated unless no addresses are
|
||||||
|
* available in any of the address families requested.
|
||||||
*
|
*
|
||||||
* _STARTATROOT:
|
* _STARTATROOT:
|
||||||
|
* Fetches will start at the root nameservers, instead of the closest
|
||||||
|
* ancestor. This is useful for reestablishing glue that has expired.
|
||||||
*
|
*
|
||||||
* _GLUEOK:
|
* _GLUEOK:
|
||||||
* _HINTOK:
|
* _HINTOK:
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* 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>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -1447,8 +1447,20 @@ fctx_getaddresses(fetchctx_t *fctx) {
|
|||||||
* Normal nameservers.
|
* Normal nameservers.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
stdoptions = DNS_ADBFIND_WANTEVENT | DNS_ADBFIND_EMPTYEVENT |
|
stdoptions = DNS_ADBFIND_WANTEVENT | DNS_ADBFIND_EMPTYEVENT;
|
||||||
DNS_ADBFIND_AVOIDFETCHES;
|
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)
|
if (res->dispatchv4 != NULL)
|
||||||
stdoptions |= DNS_ADBFIND_INET;
|
stdoptions |= DNS_ADBFIND_INET;
|
||||||
if (res->dispatchv6 != NULL)
|
if (res->dispatchv6 != NULL)
|
||||||
|
Reference in New Issue
Block a user