From ef5e39139c46f8b953845dbfd37339fcf4472e44 Mon Sep 17 00:00:00 2001 From: Michael Graff Date: Thu, 4 Nov 1999 09:42:46 +0000 Subject: [PATCH] remove checks for null view, since we won't let that happen. Add a bit of code to avoid pounding on servers that we can't find the addresses of. Right now the adb just stops checking for 5 minutes. --- lib/dns/adb.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/dns/adb.c b/lib/dns/adb.c index 31eb546d93..e1364d5903 100644 --- a/lib/dns/adb.c +++ b/lib/dns/adb.c @@ -2799,9 +2799,6 @@ dbfind_name(dns_adbname_t *adbname, isc_stdtime_t now, INSIST(DNS_ADB_VALID(adb)); INSIST(rdtype == dns_rdatatype_a || rdtype == dns_rdatatype_aaaa); - if (adb->view == NULL) - return (ISC_R_NOTIMPLEMENTED); - result = ISC_R_UNEXPECTED; dns_rdataset_init(&rdataset); @@ -2857,9 +2854,6 @@ dbfind_a6(dns_adbname_t *adbname, isc_stdtime_t now, isc_boolean_t use_hints) INSIST(DNS_ADB_VALID(adb)); INSIST(!NAME_FETCH_V6(adbname)); - if (adb->view == NULL) - return (ISC_R_NOTIMPLEMENTED); - result = ISC_R_UNEXPECTED; dns_rdataset_init(&rdataset); @@ -2981,8 +2975,15 @@ fetch_callback(isc_task_t *task, isc_event_t *ev) * Did we get back junk? If so, and there are no more fetches * sitting out there, tell all the finds about it. */ - if (dev->result != ISC_R_SUCCESS) + if (dev->result != ISC_R_SUCCESS) { + /* XXXMLG Don't pound on bad servers. */ + if (address_type == DNS_ADBFIND_INET) + name->expire_v4 = ISC_MIN(name->expire_v4, now + 300); + else + name->expire_v6 = ISC_MIN(name->expire_v6, now + 300); + goto out; + } /* * We got something potentially useful.