+ 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]
--- 9.1.1rc3 released ---
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: adb.c,v 1.162.2.2 2001/01/30 22:26:09 gson Exp $ */
+/* $Id: adb.c,v 1.162.2.3 2001/02/28 21:20:29 bwelling Exp $ */
/*
* Implementation notes
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;
}
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
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: adb.h,v 1.60.4.1 2001/01/09 22:45:02 bwelling Exp $ */
+/* $Id: adb.h,v 1.60.4.2 2001/02/28 21:20:32 bwelling Exp $ */
#ifndef DNS_ADB_H
#define DNS_ADB_H 1
* 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:
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: resolver.c,v 1.187.2.7 2001/02/20 21:56:23 gson Exp $ */
+/* $Id: resolver.c,v 1.187.2.8 2001/02/28 21:20:31 bwelling Exp $ */
#include <config.h>
* 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)