Commit 06a960c6 authored by Mark Andrews's avatar Mark Andrews

971. [func] 'try-edns' can be use to disable edns on all queries.

parent 1eaad22e
971. [func] 'try-edns' can be use to disable edns on all queries.
970. [func] 'journal-size' can now be used to set a target
size for a journal.
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: config.c,v 1.11 2001/08/07 01:58:54 marka Exp $ */
/* $Id: config.c,v 1.12 2001/08/30 05:52:08 marka Exp $ */
#include <config.h>
......@@ -101,6 +101,7 @@ options {\n\
recursion true;\n\
provide-ixfr true;\n\
request-ixfr true;\n\
try-edns true;\n\
fetch-glue no;\n\
rfc2308-type1 no;\n\
additional-from-auth true;\n\
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: query.c,v 1.198 2001/08/27 17:20:09 gson Exp $ */
/* $Id: query.c,v 1.199 2001/08/30 05:52:10 marka Exp $ */
#include <config.h>
......@@ -2080,6 +2080,7 @@ query_recurse(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qdomain,
{
isc_result_t result;
dns_rdataset_t *rdataset, *sigrdataset;
unsigned int options;
/*
* We are about to recurse, which means that this client will
......@@ -2123,10 +2124,13 @@ query_recurse(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qdomain,
if (client->query.timerset == ISC_FALSE)
ns_client_settimeout(client, 60);
options = client->query.fetchoptions;
if (!client->view->tryedns)
options |= DNS_FETCHOPT_NOEDNS0;
result = dns_resolver_createfetch(client->view->resolver,
client->query.qname,
qtype, qdomain, nameservers,
NULL, client->query.fetchoptions,
NULL, options,
client->task,
query_resume, client,
rdataset, sigrdataset,
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: server.c,v 1.339 2001/08/07 01:58:56 marka Exp $ */
/* $Id: server.c,v 1.340 2001/08/30 05:52:12 marka Exp $ */
#include <config.h>
......@@ -813,6 +813,11 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
CHECK(configure_view_acl(vconfig, config, "sortlist",
actx, ns_g_mctx, &view->sortlist));
obj = NULL;
result = ns_config_get(maps, "try-edns", &obj);
INSIST(result == ISC_R_SUCCESS);
view->tryedns = cfg_obj_asboolean(obj);
obj = NULL;
result = ns_config_get(maps, "request-ixfr", &obj);
INSIST(result == ISC_R_SUCCESS);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: adb.c,v 1.181 2001/08/08 22:54:36 gson Exp $ */
/* $Id: adb.c,v 1.182 2001/08/30 05:52:14 marka Exp $ */
/*
* Implementation notes
......@@ -1593,6 +1593,7 @@ a6missing(dns_a6context_t *a6ctx, dns_name_t *a6name) {
dns_adb_t *adb;
dns_adbfetch6_t *fetch;
isc_result_t result;
unsigned int options = 0;
name = a6ctx->arg;
INSIST(DNS_ADBNAME_VALID(name));
......@@ -1605,9 +1606,11 @@ a6missing(dns_a6context_t *a6ctx, dns_name_t *a6name) {
return;
}
if (!adb->view->tryedns)
options |= DNS_FETCHOPT_NOEDNS0;
result = dns_resolver_createfetch(adb->view->resolver, a6name,
dns_rdatatype_a6,
NULL, NULL, NULL, 0,
NULL, NULL, NULL, options,
adb->task, fetch_callback_a6,
name, &fetch->rdataset, NULL,
&fetch->fetch);
......@@ -3748,6 +3751,8 @@ fetch_name_v4(dns_adbname_t *adbname, isc_boolean_t start_at_root) {
goto cleanup;
}
if (!adb->view->tryedns)
options |= DNS_FETCHOPT_NOEDNS0;
result = dns_resolver_createfetch(adb->view->resolver, &adbname->name,
dns_rdatatype_a,
name, nameservers, NULL, options,
......@@ -3775,6 +3780,7 @@ fetch_name_aaaa(dns_adbname_t *adbname) {
isc_result_t result;
dns_adbfetch_t *fetch;
dns_adb_t *adb;
unsigned int options = 0;
INSIST(DNS_ADBNAME_VALID(adbname));
adb = adbname->adb;
......@@ -3790,9 +3796,11 @@ fetch_name_aaaa(dns_adbname_t *adbname) {
goto cleanup;
}
if (!adb->view->tryedns)
options |= DNS_FETCHOPT_NOEDNS0;
result = dns_resolver_createfetch(adb->view->resolver, &adbname->name,
dns_rdatatype_aaaa,
NULL, NULL, NULL, 0,
NULL, NULL, NULL, options,
adb->task, fetch_callback,
adbname, &fetch->rdataset, NULL,
&fetch->fetch);
......@@ -3851,6 +3859,8 @@ fetch_name_a6(dns_adbname_t *adbname, isc_boolean_t start_at_root) {
}
fetch->flags |= FETCH_FIRST_A6;
if (!adb->view->tryedns)
options |= DNS_FETCHOPT_NOEDNS0;
result = dns_resolver_createfetch(adb->view->resolver, &adbname->name,
dns_rdatatype_a6,
name, nameservers, NULL, options,
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: view.h,v 1.73 2001/08/28 03:58:23 marka Exp $ */
/* $Id: view.h,v 1.74 2001/08/30 05:52:16 marka Exp $ */
#ifndef DNS_VIEW_H
#define DNS_VIEW_H 1
......@@ -113,6 +113,7 @@ struct dns_view {
dns_acl_t * sortlist;
isc_boolean_t requestixfr;
isc_boolean_t provideixfr;
isc_boolean_t tryedns;
dns_ttl_t maxcachettl;
dns_ttl_t maxncachettl;
in_port_t dstport;
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: view.c,v 1.103 2001/08/27 17:20:10 gson Exp $ */
/* $Id: view.c,v 1.104 2001/08/30 05:52:15 marka Exp $ */
#include <config.h>
......@@ -158,6 +158,7 @@ dns_view_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
view->maxcachettl = 7 * 24 * 3600;
view->maxncachettl = 3 * 3600;
view->dstport = 53;
view->tryedns = ISC_TRUE;
result = dns_peerlist_new(view->mctx, &view->peers);
if (result != ISC_R_SUCCESS)
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: parser.c,v 1.71 2001/08/30 05:23:00 marka Exp $ */
/* $Id: parser.c,v 1.72 2001/08/30 05:52:18 marka Exp $ */
#include <config.h>
......@@ -867,6 +867,7 @@ view_clauses[] = {
{ "recursion", &cfg_type_boolean, 0 },
{ "provide-ixfr", &cfg_type_boolean, 0 },
{ "request-ixfr", &cfg_type_boolean, 0 },
{ "try-edns", &cfg_type_boolean, 0 },
{ "fetch-glue", &cfg_type_boolean, CFG_CLAUSEFLAG_OBSOLETE },
{ "rfc2308-type1", &cfg_type_boolean, CFG_CLAUSEFLAG_NYI },
{ "additional-from-auth", &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