From 1d830654f579fc606d3a5247c1c6ad827ecebed6 Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Mon, 22 Jan 2001 22:29:04 +0000 Subject: [PATCH] removed bitstring avoidance code since it was only effective when reverse mapping the exact same name multiple times within a 10-minute window, and the resolver's EDNS0 capability flagging achieves much of the same effect in a much more general way --- bin/named/include/named/lwdclient.h | 3 +-- bin/named/lwdclient.c | 3 +-- bin/named/lwdgnba.c | 35 +---------------------------- 3 files changed, 3 insertions(+), 38 deletions(-) diff --git a/bin/named/include/named/lwdclient.h b/bin/named/include/named/lwdclient.h index 05b9920800..b6bceb57ae 100644 --- a/bin/named/include/named/lwdclient.h +++ b/bin/named/include/named/lwdclient.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: lwdclient.h,v 1.11 2001/01/09 21:40:20 bwelling Exp $ */ +/* $Id: lwdclient.h,v 1.12 2001/01/22 22:29:04 gson Exp $ */ #ifndef NAMED_LWDCLIENT_H #define NAMED_LWDCLIENT_H 1 @@ -80,7 +80,6 @@ struct ns_lwdclient { dns_byaddr_t *byaddr; unsigned int options; isc_netaddr_t na; - dns_adbaddrinfo_t *addrinfo; /* * grbn (get rrset by name) state info. diff --git a/bin/named/lwdclient.c b/bin/named/lwdclient.c index 18ab38c836..59d0f7d3a2 100644 --- a/bin/named/lwdclient.c +++ b/bin/named/lwdclient.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: lwdclient.c,v 1.12 2001/01/09 21:39:47 bwelling Exp $ */ +/* $Id: lwdclient.c,v 1.13 2001/01/22 22:29:02 gson Exp $ */ #include @@ -441,7 +441,6 @@ ns_lwdclient_initialize(ns_lwdclient_t *client, ns_lwdclientmgr_t *cmgr) { client->options = 0; client->byaddr = NULL; - client->addrinfo = NULL; client->lookup = NULL; diff --git a/bin/named/lwdgnba.c b/bin/named/lwdgnba.c index 743c567d40..3946f3e270 100644 --- a/bin/named/lwdgnba.c +++ b/bin/named/lwdgnba.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: lwdgnba.c,v 1.11 2001/01/09 21:39:51 bwelling Exp $ */ +/* $Id: lwdgnba.c,v 1.12 2001/01/22 22:29:01 gson Exp $ */ #include @@ -46,7 +46,6 @@ byaddr_done(isc_task_t *task, isc_event_t *event) { isc_buffer_t b; lwres_gnbaresponse_t *gnba; isc_uint16_t naliases; - isc_stdtime_t now; UNUSED(task); @@ -67,16 +66,7 @@ byaddr_done(isc_task_t *task, isc_event_t *event) { isc_event_free(&event); bevent = NULL; - /* - * Were we trying bitstring or nibble mode? If bitstring, - * and we got FORMERR or SERVFAIL, set the flag to - * avoid bitstring labels for 10 minutes. If we got any - * other error (NXDOMAIN, etc) just try again without - * bitstrings, and let our cache handle the negative answer - * for bitstrings. - */ if ((client->options & DNS_BYADDROPT_IPV6NIBBLE) != 0) { - dns_adb_freeaddrinfo(cm->view->adb, &client->addrinfo); if (result == DNS_R_NCACHENXDOMAIN || result == DNS_R_NCACHENXRRSET || result == DNS_R_NXDOMAIN || @@ -88,13 +78,6 @@ byaddr_done(isc_task_t *task, isc_event_t *event) { return; } - isc_stdtime_get(&now); - if (result == DNS_R_FORMERR || - result == DNS_R_SERVFAIL || - result == ISC_R_FAILURE) - dns_adb_setavoidbitstring(cm->view->adb, - client->addrinfo, now + 600); - /* * Fall back to nibble reverse if the default of bitstrings * fails. @@ -132,7 +115,6 @@ byaddr_done(isc_task_t *task, isc_event_t *event) { } dns_byaddr_destroy(&client->byaddr); - dns_adb_freeaddrinfo(cm->view->adb, &client->addrinfo); isc_event_free(&event); /* @@ -163,8 +145,6 @@ byaddr_done(isc_task_t *task, isc_event_t *event) { out: if (client->byaddr != NULL) dns_byaddr_destroy(&client->byaddr); - if (client->addrinfo != NULL) - dns_adb_freeaddrinfo(cm->view->adb, &client->addrinfo); if (lwb.base != NULL) lwres_context_freemem(cm->lwctx, lwb.base, lwb.length); @@ -186,7 +166,6 @@ start_byaddr(ns_lwdclient_t *client) { client->options, cm->task, byaddr_done, client, &client->byaddr); if (result != ISC_R_SUCCESS) { - dns_adb_freeaddrinfo(cm->view->adb, &client->addrinfo); ns_lwdclient_errorpktsend(client, LWRES_R_FAILURE); return; } @@ -272,18 +251,6 @@ ns_lwdclient_processgnba(ns_lwdclient_t *client, lwres_buffer_t *b) { init_gnba(client); client->options = 0; - /* - * See if we should skip the byaddr bit. - */ - INSIST(client->addrinfo == NULL); - result = dns_adb_findaddrinfo(cm->view->adb, &sa, - &client->addrinfo, 0); - if (result != ISC_R_SUCCESS) - goto out; - - if (client->addrinfo->avoid_bitstring > 0) - client->options |= DNS_BYADDROPT_IPV6NIBBLE; - /* * Start the find. */