+3209. [func] Add "dnssec-lookaside 'off'". [RT #24858]
+
3208. [bug] 'dig -y' handle unknown tsig alorithm better.
[RT #25522]
- PERFORMANCE OF THIS SOFTWARE.
-->
-<!-- $Id: named.conf.docbook,v 1.53 2011/09/06 22:29:32 smann Exp $ -->
+<!-- $Id: named.conf.docbook,v 1.54 2011/11/07 00:14:10 marka Exp $ -->
<refentry>
<refentryinfo>
<date>Aug 13, 2004</date>
disable-algorithms <replaceable>string</replaceable> { <replaceable>string</replaceable>; ... };
dnssec-enable <replaceable>boolean</replaceable>;
dnssec-validation <replaceable>boolean</replaceable>;
- dnssec-lookaside <replaceable>string</replaceable> trust-anchor <replaceable>string</replaceable>;
- dnssec-lookaside ( <replaceable>auto</replaceable> | <replaceable>domain</replaceable> trust-anchor <replaceable>domain</replaceable> );
+ dnssec-lookaside ( <replaceable>auto</replaceable> | <replaceable>off</replaceable> | <replaceable>domain</replaceable> trust-anchor <replaceable>domain</replaceable> );
dnssec-must-be-secure <replaceable>string</replaceable> <replaceable>boolean</replaceable>;
dnssec-accept-expired <replaceable>boolean</replaceable>;
disable-algorithms <replaceable>string</replaceable> { <replaceable>string</replaceable>; ... };
dnssec-enable <replaceable>boolean</replaceable>;
dnssec-validation <replaceable>boolean</replaceable>;
- dnssec-lookaside <replaceable>string</replaceable> trust-anchor <replaceable>string</replaceable>;
+ dnssec-lookaside ( <replaceable>auto</replaceable> | <replaceable>off</replaceable> | <replaceable>domain</replaceable> trust-anchor <replaceable>domain</replaceable> );
dnssec-must-be-secure <replaceable>string</replaceable> <replaceable>boolean</replaceable>;
dnssec-accept-expired <replaceable>boolean</replaceable>;
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: server.c,v 1.628 2011/11/03 23:46:26 tbox Exp $ */
+/* $Id: server.c,v 1.629 2011/11/07 00:14:10 marka Exp $ */
/*! \file */
if (result == ISC_R_SUCCESS) {
/* If set to "auto", use the version from the defaults */
const cfg_obj_t *dlvobj;
+ const char *dom;
dlvobj = cfg_listelt_value(cfg_list_first(obj));
- if (!strcmp(cfg_obj_asstring(cfg_tuple_get(dlvobj, "domain")),
- "auto") &&
- cfg_obj_isvoid(cfg_tuple_get(dlvobj, "trust-anchor"))) {
- auto_dlv = ISC_TRUE;
- obj = NULL;
- result = cfg_map_get(ns_g_defaults,
- "dnssec-lookaside", &obj);
+ dom = cfg_obj_asstring(cfg_tuple_get(dlvobj, "domain"));
+ if (cfg_obj_isvoid(cfg_tuple_get(dlvobj, "trust-anchor"))) {
+ /* If "no", skip; if "auto", use global default */
+ if (!strcasecmp(dom, "no"))
+ result = ISC_R_NOTFOUND;
+ else if (!strcasecmp(dom, "auto")) {
+ auto_dlv = ISC_TRUE;
+ obj = NULL;
+ result = cfg_map_get(ns_g_defaults,
+ "dnssec-lookaside", &obj);
+ }
}
}
CHECK(dns_zone_create(&zone, mctx));
CHECK(dns_zone_setorigin(zone, name));
dns_zone_setview(zone, view);
- CHECK(dns_zonemgr_managezone(ns_g_server->zonemgr, zone));
+ CHECK(dns_zonemgr_managezone(ns_g_server->zonemgr,
+ zone));
dns_zone_setclass(zone, view->rdclass);
dns_zone_settype(zone, dns_zone_master);
dns_zone_setstats(zone, ns_g_server->zonestats);
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dnssec.2,v 1.4 2011/05/08 07:12:47 marka Exp $ */
+/* $Id: dnssec.2,v 1.5 2011/11/07 00:14:11 marka Exp $ */
options {
dnssec-enable no;
match-clients { none; };
dnssec-validation auto;
};
+
+view view3 {
+ match-clients { none; };
+ auto-dnssec maintain;
+};
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dnssec.3,v 1.4 2011/05/08 07:12:48 marka Exp $ */
+/* $Id: dnssec.3,v 1.5 2011/11/07 00:14:11 marka Exp $ */
options {
dnssec-validation no;
match-clients { none; };
dnssec-enable yes;
};
+
+view view3 {
+ match-clients { none; };
+ dnssec-lookaside auto;
+};
+
+view view4 {
+ match-clients { none; };
+ dnssec-lookaside no;
+};
+
+view view5 {
+ match-clients { none; };
+ auto-dnssec off;
+};
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: tests.sh,v 1.7 2011/05/07 23:47:28 tbox Exp $
+# $Id: tests.sh,v 1.8 2011/11/07 00:14:11 marka Exp $
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
echo "I: checking named-checkconf dnssec warnings"
ret=0
$CHECKCONF dnssec.1 2>&1 | grep 'validation yes.*enable no' > /dev/null || ret=1
+$CHECKCONF dnssec.2 2>&1 | grep 'auto-dnssec may only be ' > /dev/null || ret=1
$CHECKCONF dnssec.2 2>&1 | grep 'validation auto.*enable no' > /dev/null || ret=1
$CHECKCONF dnssec.2 2>&1 | grep 'validation yes.*enable no' > /dev/null || ret=1
# this one should have no warnings
- PERFORMANCE OF THIS SOFTWARE.
-->
-<!-- File: $Id: Bv9ARM-book.xml,v 1.514 2011/11/04 02:25:17 tbox Exp $ -->
+<!-- File: $Id: Bv9ARM-book.xml,v 1.515 2011/11/07 00:14:11 marka Exp $ -->
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<title>BIND 9 Administrator Reference Manual</title>
<optional> ixfr-from-differences (<replaceable>yes_or_no</replaceable> | <constant>master</constant> | <constant>slave</constant>); </optional>
<optional> dnssec-enable <replaceable>yes_or_no</replaceable>; </optional>
<optional> dnssec-validation (<replaceable>yes_or_no</replaceable> | <constant>auto</constant>); </optional>
- <optional> dnssec-lookaside ( <replaceable>auto</replaceable> |
+ <optional> dnssec-lookaside ( <replaceable>auto</replaceable> |
+ <replaceable>off</replaceable> |
<replaceable>domain</replaceable> trust-anchor <replaceable>domain</replaceable> ); </optional>
<optional> dnssec-must-be-secure <replaceable>domain yes_or_no</replaceable>; </optional>
<optional> dnssec-accept-expired <replaceable>yes_or_no</replaceable>; </optional>
values for the DLV domain and trust anchor will be
used, along with a built-in key for validation.
</para>
+ <para>
+ If <command>dnssec-lookaside</command> is set to
+ <userinput>off</userinput>, then dnssec-lookaside
+ is not used.
+ </para>
<para>
The default DLV key is stored in the file
<filename>bind.keys</filename>;
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: check.c,v 1.137 2011/10/29 00:15:56 each Exp $ */
+/* $Id: check.c,v 1.138 2011/11/07 00:14:11 marka Exp $ */
/*! \file */
unsigned int max;
} intervaltable;
+typedef enum {
+ optlevel_config,
+ optlevel_options,
+ optlevel_view,
+ optlevel_zone
+} optlevel_t;
+
static isc_result_t
-check_options(const cfg_obj_t *options, isc_log_t *logctx, isc_mem_t *mctx) {
+check_options(const cfg_obj_t *options, isc_log_t *logctx, isc_mem_t *mctx,
+ optlevel_t optlevel)
+{
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult;
unsigned int i;
element = cfg_list_next(element))
{
const char *dlv;
- const cfg_obj_t *anchor;
+ const cfg_obj_t *dlvobj, *anchor;
obj = cfg_listelt_value(element);
- dlv = cfg_obj_asstring(cfg_tuple_get(obj, "domain"));
anchor = cfg_tuple_get(obj, "trust-anchor");
+ dlvobj = cfg_tuple_get(obj, "domain");
+ dlv = cfg_obj_asstring(dlvobj);
/*
- * If domain is "auto" and trust anchor is missing,
- * skip remaining tests
+ * If domain is "auto" or "no" and trust anchor
+ * is missing, skip remaining tests
*/
- if (!strcmp(dlv, "auto") && cfg_obj_isvoid(anchor))
- continue;
+ if (cfg_obj_isvoid(anchor)) {
+ if (!strcasecmp(dlv, "no") ||
+ !strcasecmp(dlv, "auto"))
+ continue;
+ }
isc_buffer_init(&b, dlv, strlen(dlv));
isc_buffer_add(&b, strlen(dlv));
} else {
cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
"dnssec-lookaside requires "
- "either 'auto' or a domain and "
- "trust anchor");
+ "either 'auto' or 'no', or a "
+ "domain and trust anchor");
if (result == ISC_R_SUCCESS)
result = ISC_R_FAILURE;
}
isc_symtab_destroy(&symtab);
}
+ /*
+ * Check auto-dnssec at the view/options level
+ */
+ obj = NULL;
+ (void)cfg_map_get(options, "auto-dnssec", &obj);
+ if (obj != NULL) {
+ const char *arg = cfg_obj_asstring(obj);
+ if (optlevel != optlevel_zone && strcasecmp(arg, "off") != 0) {
+ cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+ "auto-dnssec may only be activated at the "
+ "zone level");
+ result = ISC_R_FAILURE;
+ }
+ }
+
/*
* Check dnssec-must-be-secure.
*/
/*
* Check various options.
*/
- tresult = check_options(zoptions, logctx, mctx);
+ tresult = check_options(zoptions, logctx, mctx, optlevel_zone);
if (tresult != ISC_R_SUCCESS)
result = tresult;
result = tresult;
}
}
+
/*
* Check options.
*/
if (voptions != NULL)
- tresult = check_options(voptions, logctx, mctx);
+ tresult = check_options(voptions, logctx, mctx,
+ optlevel_view);
else
- tresult = check_options(config, logctx, mctx);
+ tresult = check_options(config, logctx, mctx,
+ optlevel_config);
if (tresult != ISC_R_SUCCESS)
result = tresult;
(void)cfg_map_get(config, "options", &options);
if (options != NULL &&
- check_options(options, logctx, mctx) != ISC_R_SUCCESS)
+ check_options(options, logctx, mctx,
+ optlevel_options) != ISC_R_SUCCESS)
result = ISC_R_FAILURE;
if (bind9_check_logging(config, logctx, mctx) != ISC_R_SUCCESS)
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: namedconf.c,v 1.142 2011/10/13 01:32:34 vjs Exp $ */
+/* $Id: namedconf.c,v 1.143 2011/11/07 00:14:11 marka Exp $ */
/*! \file */
static void
doc_lookaside(cfg_printer_t *pctx, const cfg_type_t *type) {
UNUSED(type);
- cfg_print_cstr(pctx, "( <string> trust-anchor <string> | auto )");
+ cfg_print_cstr(pctx, "( <string> trust-anchor <string> | auto | no )");
}
static keyword_type_t trustanchor_kw = { "trust-anchor", &cfg_type_astring };
{ "also-notify", &cfg_type_namesockaddrkeylist, 0 },
{ "alt-transfer-source", &cfg_type_sockaddr4wild, 0 },
{ "alt-transfer-source-v6", &cfg_type_sockaddr6wild, 0 },
+ { "auto-dnssec", &cfg_type_autodnssec, 0 },
{ "check-dup-records", &cfg_type_checkmode, 0 },
{ "check-integrity", &cfg_type_boolean, 0 },
{ "check-mx", &cfg_type_checkmode, 0 },
*/
{ "check-names", &cfg_type_checkmode, 0 },
{ "ixfr-from-differences", &cfg_type_boolean, 0 },
- { "auto-dnssec", &cfg_type_autodnssec, 0 },
{ "server-addresses", &cfg_type_bracketed_sockaddrlist, 0 },
{ "server-names", &cfg_type_namelist, 0 },
{ NULL, NULL, 0 }