Commit d9112843 authored by Bob Halley's avatar Bob Halley

add support for minimal-responses

parent bf49a521
779. [func] Added the "minimal-responses" option.
778. [bug] When starting cache cleaning, cleaning_timer_action()
returned without first pausing the iterator, which
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: config.c,v 1.4 2001/03/05 13:43:14 tale Exp $ */
/* $Id: config.c,v 1.5 2001/03/14 21:53:20 halley Exp $ */
#include <config.h>
......@@ -94,6 +94,7 @@ options {\n\
# sortlist <none>\n\
# topology <none>\n\
auth-nxdomain false;\n\
minimal-responses false;\n\
recursion true;\n\
provide-ixfr true;\n\
request-ixfr true;\n\
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: query.c,v 1.188 2001/03/14 19:32:58 halley Exp $ */
/* $Id: query.c,v 1.189 2001/03/14 21:53:21 halley Exp $ */
#include <config.h>
......@@ -241,10 +241,6 @@ query_reset(ns_client_t *client, isc_boolean_t everything) {
query_maybeputqname(client);
client->query.attributes = (NS_QUERYATTR_RECURSIONOK |
#ifdef MINIMIZE_RESPONSES
NS_QUERYATTR_NOAUTHORITY |
NS_QUERYATTR_NOADDITIONAL |
#endif
NS_QUERYATTR_CACHEOK);
client->query.restarts = 0;
client->query.timerset = ISC_FALSE;
......@@ -1496,10 +1492,8 @@ query_addrdataset(ns_client_t *client, dns_name_t *fname,
ISC_LIST_APPEND(fname->list, rdataset, link);
#ifdef MINIMIZE_RESPONSES
if (NOADDITIONAL(client))
return;
#endif
/*
* Add additional data.
......@@ -2638,7 +2632,6 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
* database by setting client->query.gluedb.
*/
client->query.gluedb = db;
#ifdef MINIMIZE_RESPONSES
/*
* We must ensure NOADDITIONAL is off,
* because the generation of
......@@ -2647,7 +2640,6 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
*/
client->query.attributes &=
~NS_QUERYATTR_NOADDITIONAL;
#endif
if (sigrdataset != NULL)
sigrdatasetp = &sigrdataset;
else
......@@ -2740,7 +2732,6 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
client->query.gluedb = zdb;
client->query.attributes |=
NS_QUERYATTR_CACHEGLUEOK;
#ifdef MINIMIZE_RESPONSES
/*
* We must ensure NOADDITIONAL is off,
* because the generation of
......@@ -2749,7 +2740,6 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
*/
client->query.attributes &=
~NS_QUERYATTR_NOADDITIONAL;
#endif
if (sigrdataset != NULL)
sigrdatasetp = &sigrdataset;
else
......@@ -3162,10 +3152,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
* Add NS records to the authority section (if we haven't already
* added them to the answer section).
*/
if (!want_restart
#ifdef MINIMIZE_RESPONSES
&& !NOAUTHORITY(client)
#endif
if (!want_restart && !NOAUTHORITY(client)
) {
if (is_zone) {
if (!((qtype == dns_rdatatype_ns ||
......@@ -3297,6 +3284,10 @@ ns_query_start(ns_client_t *client) {
(message->flags & DNS_MESSAGEFLAG_AD) != 0)
client->query.attributes |= NS_QUERYATTR_WANTDNSSEC;
if (client->view->minimalresponses)
client->query.attributes |= (NS_QUERYATTR_NOAUTHORITY |
NS_QUERYATTR_NOADDITIONAL);
if ((client->view->cachedb == NULL)
|| (!client->view->additionalfromcache)) {
/*
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: server.c,v 1.303 2001/03/10 06:39:47 tale Exp $ */
/* $Id: server.c,v 1.304 2001/03/14 21:53:23 halley Exp $ */
#include <config.h>
......@@ -729,6 +729,11 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
INSIST(result == ISC_R_SUCCESS);
view->auth_nxdomain = cfg_obj_asboolean(obj);
obj = NULL;
result = ns_config_get(maps, "minimal-responses", &obj);
INSIST(result == ISC_R_SUCCESS);
view->minimalresponses = cfg_obj_asboolean(obj);
obj = NULL;
result = ns_config_get(maps, "transfer-format", &obj);
INSIST(result == ISC_R_SUCCESS);
......
......@@ -2,7 +2,7 @@
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd">
<!-- File: $Id: Bv9ARM-book.xml,v 1.115 2001/03/09 00:59:44 gson Exp $ -->
<!-- File: $Id: Bv9ARM-book.xml,v 1.116 2001/03/14 21:53:25 halley Exp $ -->
<book>
<title>BIND 9 Administrator Reference Manual</title>
......@@ -2576,6 +2576,7 @@ statement in the <filename>named.conf</filename> file:</para>
<optional> fetch-glue <replaceable>yes_or_no</replaceable>; </optional>
<optional> has-old-clients <replaceable>yes_or_no</replaceable>; </optional>
<optional> host-statistics <replaceable>yes_or_no</replaceable>; </optional>
<optional> minimal-responses <replaceable>yes_or_no</replaceable>; </optional>
<optional> multiple-cnames <replaceable>yes_or_no</replaceable>; </optional>
<optional> notify <replaceable>yes_or_no</replaceable> | <replaceable>explicit</replaceable>; </optional>
<optional> recursion <replaceable>yes_or_no</replaceable>; </optional>
......@@ -2847,6 +2848,14 @@ log whenever possible. If you need to disable outgoing incremental zone
transfers, use <command>provide-ixfr</command> <userinput>no</userinput>.
</para></listitem></varlistentry>
<varlistentry><term><command>minimal-responses</command></term>
<listitem><para>If <userinput>yes</userinput>, then when generating
responses the server will only add records to the authority and
additional data sections when they are required (e.g. delegations,
negative responses). This may improve the performance of the server.
The default is <userinput>no</userinput>.
</para></listitem></varlistentry>
<varlistentry><term><command>multiple-cnames</command></term>
<listitem><para>This option was used in <acronym>BIND</acronym> 8 to allow
a domain name to allow multiple CNAME records in violation of the
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: view.h,v 1.67 2001/02/14 03:50:13 gson Exp $ */
/* $Id: view.h,v 1.68 2001/03/14 21:53:28 halley Exp $ */
#ifndef DNS_VIEW_H
#define DNS_VIEW_H 1
......@@ -104,6 +104,7 @@ struct dns_view {
isc_boolean_t auth_nxdomain;
isc_boolean_t additionalfromcache;
isc_boolean_t additionalfromauth;
isc_boolean_t minimalresponses;
dns_transfer_format_t transfer_format;
dns_acl_t * queryacl;
dns_acl_t * recursionacl;
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: view.c,v 1.96 2001/02/14 03:50:10 gson Exp $ */
/* $Id: view.c,v 1.97 2001/03/14 21:53:27 halley Exp $ */
#include <config.h>
......@@ -145,6 +145,7 @@ dns_view_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
view->auth_nxdomain = ISC_FALSE; /* Was true in BIND 8 */
view->additionalfromcache = ISC_TRUE;
view->additionalfromauth = ISC_TRUE;
view->minimalresponses = ISC_FALSE;
view->transfer_format = dns_one_answer;
view->queryacl = NULL;
view->recursionacl = NULL;
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: parser.c,v 1.46 2001/03/14 00:30:06 gson Exp $ */
/* $Id: parser.c,v 1.47 2001/03/14 21:53:29 halley Exp $ */
#include <config.h>
......@@ -846,6 +846,7 @@ view_clauses[] = {
{ "sortlist", &cfg_type_bracketed_aml, 0 },
{ "topology", &cfg_type_bracketed_aml, CFG_CLAUSEFLAG_NOTIMP },
{ "auth-nxdomain", &cfg_type_boolean, CFG_CLAUSEFLAG_NEWDEFAULT },
{ "minimal-responses", &cfg_type_boolean, 0 },
{ "recursion", &cfg_type_boolean, 0 },
{ "provide-ixfr", &cfg_type_boolean, 0 },
{ "request-ixfr", &cfg_type_boolean, 0 },
......
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