mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38:26 +00:00
Support rfc2308-type1 options statement.
This commit is contained in:
parent
b3bdf85fd8
commit
3f8c638594
@ -22,6 +22,7 @@ options {
|
||||
statistics-file "named.stats"; // _PATH_STATS
|
||||
memstatistics-file "named.memstats"; // _PATH_MEMSTATS
|
||||
|
||||
rfc2308-type1 no;
|
||||
tkey-domain "foo.com";
|
||||
tkey-dhkey "xyz" 666 ;
|
||||
check-names master fail;
|
||||
|
@ -76,6 +76,7 @@
|
||||
#define OPTIONS_TRANSFER_FORMAT_BIT 32
|
||||
#define FORWARD_BIT 33
|
||||
#define EXPERT_MODE_BIT 34
|
||||
#define RFC2308_TYPE1_BIT 35
|
||||
|
||||
|
||||
static isc_result_t cfg_set_iplist(isc_log_t *lctx, dns_c_options_t *options,
|
||||
@ -1363,6 +1364,27 @@ dns_c_ctx_setuseidpool(isc_log_t *lctx,
|
||||
}
|
||||
|
||||
|
||||
isc_result_t
|
||||
dns_c_ctx_setrfc2308type1(isc_log_t *lctx,
|
||||
dns_c_ctx_t *cfg, isc_boolean_t newval)
|
||||
{
|
||||
isc_result_t res;
|
||||
|
||||
REQUIRE(DNS_CONFCTX_VALID(cfg));
|
||||
|
||||
res = make_options(lctx, cfg);
|
||||
if (res != ISC_R_SUCCESS) {
|
||||
return (res);
|
||||
}
|
||||
|
||||
return (cfg_set_boolean(lctx, cfg->options,
|
||||
&cfg->options->rfc2308_type1,
|
||||
newval,
|
||||
&cfg->options->setflags1,
|
||||
RFC2308_TYPE1_BIT));
|
||||
}
|
||||
|
||||
|
||||
isc_result_t
|
||||
dns_c_ctx_setdialup(isc_log_t *lctx,
|
||||
dns_c_ctx_t *cfg, isc_boolean_t newval)
|
||||
@ -2559,6 +2581,26 @@ dns_c_ctx_getuseidpool(isc_log_t *lctx,
|
||||
}
|
||||
|
||||
|
||||
isc_result_t
|
||||
dns_c_ctx_getrfc2308type1(isc_log_t *lctx,
|
||||
dns_c_ctx_t *cfg, isc_boolean_t *retval)
|
||||
{
|
||||
REQUIRE(DNS_CONFCTX_VALID(cfg));
|
||||
REQUIRE(retval != NULL);
|
||||
|
||||
if (cfg->options == NULL) {
|
||||
return (ISC_R_NOTFOUND);
|
||||
}
|
||||
|
||||
|
||||
return (cfg_get_boolean(lctx, cfg->options,
|
||||
&cfg->options->rfc2308_type1,
|
||||
retval,
|
||||
&cfg->options->setflags1,
|
||||
RFC2308_TYPE1_BIT));
|
||||
}
|
||||
|
||||
|
||||
isc_result_t
|
||||
dns_c_ctx_getdialup(isc_log_t *lctx,
|
||||
dns_c_ctx_t *cfg, isc_boolean_t *retval)
|
||||
@ -2968,6 +3010,7 @@ dns_c_ctx_optionsnew(isc_log_t *lctx,
|
||||
opts->auth_nx_domain = ISC_FALSE;
|
||||
opts->multiple_cnames = ISC_FALSE;
|
||||
opts->use_id_pool = ISC_FALSE;
|
||||
opts->rfc2308_type1 = ISC_FALSE;
|
||||
opts->dialup = ISC_FALSE;
|
||||
|
||||
opts->max_transfer_time_in = 0;
|
||||
@ -3221,6 +3264,8 @@ dns_c_ctx_optionsprint(isc_log_t *lctx,
|
||||
"multiple-cnames", setflags1);
|
||||
PRINT_AS_BOOLEAN(use_id_pool, USE_ID_POOL_BIT,
|
||||
"use-id-pool", setflags1);
|
||||
PRINT_AS_BOOLEAN(rfc2308_type1, RFC2308_TYPE1_BIT,
|
||||
"rfc2308-type1", setflags1);
|
||||
PRINT_AS_BOOLEAN(dialup, DIALUP_BIT,
|
||||
"dialup", setflags1);
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
#if !defined(lint) && !defined(SABER)
|
||||
static char rcsid[] = "$Id: confparser.y,v 1.22 1999/10/29 15:44:06 halley Exp $";
|
||||
static char rcsid[] = "$Id: confparser.y,v 1.23 1999/11/02 09:13:47 brister Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <config.h>
|
||||
@ -262,7 +262,7 @@ static void yyerror(const char *);
|
||||
%token L_NO
|
||||
%token L_FALSE
|
||||
%token L_VIEW
|
||||
|
||||
%token L_RFC2308_TYPE1
|
||||
|
||||
%type <boolean> yea_or_nay
|
||||
|
||||
@ -637,6 +637,13 @@ option: /* Empty */
|
||||
parser_error(ISC_FALSE, "Redefining use-id-pool.");
|
||||
}
|
||||
}
|
||||
| L_RFC2308_TYPE1 yea_or_nay
|
||||
{
|
||||
tmpres = dns_c_ctx_setrfc2308type1(logcontext, currcfg, $2);
|
||||
if (tmpres == ISC_R_EXISTS) {
|
||||
parser_error(ISC_FALSE, "Redefining rfc2308-type.");
|
||||
}
|
||||
}
|
||||
| L_LISTEN_ON maybe_port L_LBRACE address_match_list L_RBRACE
|
||||
{
|
||||
if ($4 == NULL) {
|
||||
@ -3382,6 +3389,7 @@ static struct token keyword_tokens [] = {
|
||||
{ "print-time", L_PRINT_TIME },
|
||||
{ "pubkey", L_PUBKEY },
|
||||
{ "query-source", L_QUERY_SOURCE },
|
||||
{ "rfc2308-type1", L_RFC2308_TYPE1 },
|
||||
{ "rrset-order", L_RRSET_ORDER },
|
||||
{ "recursion", L_RECURSION },
|
||||
{ "response", L_RESPONSE },
|
||||
|
@ -165,7 +165,7 @@ struct dns_c_options
|
||||
isc_boolean_t multiple_cnames;
|
||||
isc_boolean_t use_id_pool;
|
||||
isc_boolean_t dialup;
|
||||
isc_boolean_t rfc2038type1; /* XXX not implemented yet */
|
||||
isc_boolean_t rfc2308_type1;
|
||||
|
||||
isc_sockaddr_t query_source_addr;
|
||||
short query_source_port;
|
||||
@ -392,6 +392,9 @@ isc_result_t dns_c_ctx_setmultiplecnames(isc_log_t *lctx,
|
||||
isc_result_t dns_c_ctx_setuseidpool(isc_log_t *lctx,
|
||||
dns_c_ctx_t *cfg,
|
||||
isc_boolean_t newval);
|
||||
isc_result_t dns_c_ctx_setrfc2308type1(isc_log_t *lctx,
|
||||
dns_c_ctx_t *cfg,
|
||||
isc_boolean_t newval);
|
||||
isc_result_t dns_c_ctx_setdialup(isc_log_t *lctx,
|
||||
dns_c_ctx_t *cfg, isc_boolean_t newval);
|
||||
isc_result_t dns_c_ctx_setquerysourceaddr(isc_log_t *lctx,
|
||||
@ -541,6 +544,8 @@ isc_result_t dns_c_ctx_getmultiplecnames(isc_log_t *lctx, dns_c_ctx_t *cfg,
|
||||
isc_boolean_t *retval);
|
||||
isc_result_t dns_c_ctx_getuseidpool(isc_log_t *lctx, dns_c_ctx_t *cfg,
|
||||
isc_boolean_t *retval);
|
||||
isc_result_t dns_c_ctx_getrfc2308type1(isc_log_t *lctx, dns_c_ctx_t *cfg,
|
||||
isc_boolean_t *retval);
|
||||
isc_result_t dns_c_ctx_getdialup(isc_log_t *lctx,
|
||||
dns_c_ctx_t *cfg, isc_boolean_t *retval);
|
||||
isc_result_t dns_c_ctx_getquerysourceaddr(isc_log_t *lctx, dns_c_ctx_t *cfg,
|
||||
|
Loading…
x
Reference in New Issue
Block a user