mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-01-03 05:19:34 -05:00
autotrust options
git-svn-id: file:///svn/unbound/trunk@1776 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
0210f4ae41
commit
7d90b75ce8
10 changed files with 1471 additions and 1298 deletions
|
|
@ -1,6 +1,7 @@
|
|||
25 August 2009: Wouter
|
||||
- fixup memleak in trust anchor unsupported algorithm check.
|
||||
- iana portlist updated.
|
||||
- autotrust options: add-holddown, del-holddown, keep-missing.
|
||||
|
||||
24 August 2009: Wouter
|
||||
- cleaner memory allocation on exit. autotrust test routines.
|
||||
|
|
|
|||
|
|
@ -355,6 +355,16 @@ server:
|
|||
# A message with an NSEC3 with larger count is marked insecure.
|
||||
# List in ascending order the keysize and count values.
|
||||
# val-nsec3-keysize-iterations: "1024 150 2048 500 4096 2500"
|
||||
|
||||
# instruct the auto-trust-anchor-file probing to add anchors after ttl.
|
||||
# add-holddown: 2592000 # 30 days
|
||||
|
||||
# instruct the auto-trust-anchor-file probing to del anchors after ttl.
|
||||
# del-holddown: 2592000 # 30 days
|
||||
|
||||
# auto-trust-anchor-file probing removes missing anchors after ttl.
|
||||
# If the value 0 is given, missing anchors are not removed.
|
||||
# keep-missing: 31622400 # 366 days
|
||||
|
||||
# the amount of memory to use for the key cache.
|
||||
# plain value in bytes or you can append k, m or G. default is "4Mb".
|
||||
|
|
|
|||
|
|
@ -594,6 +594,26 @@ be in ascending order and have at least one entry. If you set it to
|
|||
"1024 65535" there is no restriction to NSEC3 iteration values.
|
||||
This table must be kept short; a very long list could cause slower operation.
|
||||
.TP
|
||||
.B add\-holddown: \fI<seconds>
|
||||
Instruct the \fBauto\-trust\-anchor\-file\fR probe mechanism for RFC5011
|
||||
autotrust updates to add new trust anchors only after they have been
|
||||
visible for this time. Default is 30 days as per the RFC.
|
||||
.TP
|
||||
.B del\-holddown: \fI<seconds>
|
||||
Instruct the \fBauto\-trust\-anchor\-file\fR probe mechanism for RFC5011
|
||||
autotrust updates to remove revoked trust anchors after they have been
|
||||
kept in the revoked list for this long. Default is 30 days as per
|
||||
the RFC.
|
||||
.TP
|
||||
.B keep\-missing: \fI<seconds>
|
||||
Instruct the \fBauto\-trust\-anchor\-file\fR probe mechanism for RFC5011
|
||||
autotrust updates to remove missing trust anchors after they have been
|
||||
unseen for this long. This cleans up the state file if the target zone
|
||||
does not perform trust anchor revocation, so this makes the auto probe
|
||||
mechanism work with zones that perform regular (non\-5011) rollovers.
|
||||
The default is 366 days. The value 0 does not remove missing anchors,
|
||||
as per the RFC.
|
||||
.TP
|
||||
.B key\-cache\-size: \fI<number>
|
||||
Number of bytes size of the key cache. Default is 4 megabytes.
|
||||
A plain number is in bytes, append 'k', 'm' or 'g' for kilobytes, megabytes
|
||||
|
|
|
|||
|
|
@ -178,6 +178,9 @@ print_option(struct config_file* cfg, const char* opt)
|
|||
else O_DEC(opt, "val-log-level", val_log_level)
|
||||
else O_YNO(opt, "val-permissive-mode", val_permissive_mode)
|
||||
else O_STR(opt, "val-nsec3-keysize-iterations",val_nsec3_key_iterations)
|
||||
else O_UNS(opt, "add-holddown", add_holddown)
|
||||
else O_UNS(opt, "del-holddown", del_holddown)
|
||||
else O_UNS(opt, "keep-missing", keep_missing)
|
||||
else O_MEM(opt, "key-cache-size", key_cache_size)
|
||||
else O_DEC(opt, "key-cache-slabs", key_cache_slabs)
|
||||
else O_MEM(opt, "neg-cache-size", neg_cache_size)
|
||||
|
|
|
|||
|
|
@ -394,6 +394,15 @@ int config_set_option(struct config_file* cfg, const char* opt,
|
|||
} else if(strcmp(opt, "val-nsec3-keysize-iterations:") == 0) {
|
||||
free(cfg->val_nsec3_key_iterations);
|
||||
return (cfg->val_nsec3_key_iterations = strdup(val)) != NULL;
|
||||
} else if(strcmp(opt, "add-holddown:") == 0) {
|
||||
IS_NUMBER_OR_ZERO;
|
||||
cfg->add_holddown = (unsigned)atoi(val);
|
||||
} else if(strcmp(opt, "del-holddown:") == 0) {
|
||||
IS_NUMBER_OR_ZERO;
|
||||
cfg->del_holddown = (unsigned)atoi(val);
|
||||
} else if(strcmp(opt, "keep-missing:") == 0) {
|
||||
IS_NUMBER_OR_ZERO;
|
||||
cfg->keep_missing = (unsigned)atoi(val);
|
||||
} else if(strcmp(opt, "key-cache-size:") == 0) {
|
||||
return cfg_parse_memsize(val, &cfg->key_cache_size);
|
||||
} else if(strcmp(opt, "key-cache-slabs:") == 0) {
|
||||
|
|
|
|||
1830
util/configlexer.c
1830
util/configlexer.c
File diff suppressed because it is too large
Load diff
|
|
@ -206,6 +206,9 @@ key-cache-slabs{COLON} { YDVAR(1, VAR_KEY_CACHE_SLABS) }
|
|||
neg-cache-size{COLON} { YDVAR(1, VAR_NEG_CACHE_SIZE) }
|
||||
val-nsec3-keysize-iterations{COLON} {
|
||||
YDVAR(1, VAR_VAL_NSEC3_KEYSIZE_ITERATIONS) }
|
||||
add-holddown{COLON} { YDVAR(1, VAR_ADD_HOLDDOWN) }
|
||||
del-holddown{COLON} { YDVAR(1, VAR_DEL_HOLDDOWN) }
|
||||
keep-missing{COLON} { YDVAR(1, VAR_KEEP_MISSING) }
|
||||
use-syslog{COLON} { YDVAR(1, VAR_USE_SYSLOG) }
|
||||
log-time-ascii{COLON} { YDVAR(1, VAR_LOG_TIME_ASCII) }
|
||||
local-zone{COLON} { YDVAR(2, VAR_LOCAL_ZONE) }
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -145,7 +145,10 @@
|
|||
VAR_VAL_SIG_SKEW_MAX = 361,
|
||||
VAR_CACHE_MIN_TTL = 362,
|
||||
VAR_VAL_LOG_LEVEL = 363,
|
||||
VAR_AUTO_TRUST_ANCHOR_FILE = 364
|
||||
VAR_AUTO_TRUST_ANCHOR_FILE = 364,
|
||||
VAR_KEEP_MISSING = 365,
|
||||
VAR_ADD_HOLDDOWN = 366,
|
||||
VAR_DEL_HOLDDOWN = 367
|
||||
};
|
||||
#endif
|
||||
/* Tokens. */
|
||||
|
|
@ -256,6 +259,9 @@
|
|||
#define VAR_CACHE_MIN_TTL 362
|
||||
#define VAR_VAL_LOG_LEVEL 363
|
||||
#define VAR_AUTO_TRUST_ANCHOR_FILE 364
|
||||
#define VAR_KEEP_MISSING 365
|
||||
#define VAR_ADD_HOLDDOWN 366
|
||||
#define VAR_DEL_HOLDDOWN 367
|
||||
|
||||
|
||||
|
||||
|
|
@ -272,7 +278,7 @@ typedef union YYSTYPE
|
|||
|
||||
|
||||
/* Line 1676 of yacc.c */
|
||||
#line 276 "util/configparser.h"
|
||||
#line 282 "util/configparser.h"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
|
|
|
|||
|
|
@ -99,7 +99,8 @@ extern struct config_parser_state* cfg_parser;
|
|||
%token VAR_STUB_PRIME VAR_UNWANTED_REPLY_THRESHOLD VAR_LOG_TIME_ASCII
|
||||
%token VAR_DOMAIN_INSECURE VAR_PYTHON VAR_PYTHON_SCRIPT VAR_VAL_SIG_SKEW_MIN
|
||||
%token VAR_VAL_SIG_SKEW_MAX VAR_CACHE_MIN_TTL VAR_VAL_LOG_LEVEL
|
||||
%token VAR_AUTO_TRUST_ANCHOR_FILE
|
||||
%token VAR_AUTO_TRUST_ANCHOR_FILE VAR_KEEP_MISSING VAR_ADD_HOLDDOWN
|
||||
%token VAR_DEL_HOLDDOWN
|
||||
|
||||
%%
|
||||
toplevelvars: /* empty */ | toplevelvars toplevelvar ;
|
||||
|
|
@ -150,7 +151,8 @@ content_server: server_num_threads | server_verbosity | server_port |
|
|||
server_unwanted_reply_threshold | server_log_time_ascii |
|
||||
server_domain_insecure | server_val_sig_skew_min |
|
||||
server_val_sig_skew_max | server_cache_min_ttl | server_val_log_level |
|
||||
server_auto_trust_anchor_file
|
||||
server_auto_trust_anchor_file | server_add_holddown |
|
||||
server_del_holddown | server_keep_missing
|
||||
;
|
||||
stubstart: VAR_STUB_ZONE
|
||||
{
|
||||
|
|
@ -872,6 +874,33 @@ server_val_nsec3_keysize_iterations: VAR_VAL_NSEC3_KEYSIZE_ITERATIONS STRING_ARG
|
|||
cfg_parser->cfg->val_nsec3_key_iterations = $2;
|
||||
}
|
||||
;
|
||||
server_add_holddown: VAR_ADD_HOLDDOWN STRING_ARG
|
||||
{
|
||||
OUTYY(("P(server_add_holddown:%s)\n", $2));
|
||||
if(atoi($2) == 0 && strcmp($2, "0") != 0)
|
||||
yyerror("number expected");
|
||||
else cfg_parser->cfg->add_holddown = atoi($2);
|
||||
free($2);
|
||||
}
|
||||
;
|
||||
server_del_holddown: VAR_DEL_HOLDDOWN STRING_ARG
|
||||
{
|
||||
OUTYY(("P(server_del_holddown:%s)\n", $2));
|
||||
if(atoi($2) == 0 && strcmp($2, "0") != 0)
|
||||
yyerror("number expected");
|
||||
else cfg_parser->cfg->del_holddown = atoi($2);
|
||||
free($2);
|
||||
}
|
||||
;
|
||||
server_keep_missing: VAR_KEEP_MISSING STRING_ARG
|
||||
{
|
||||
OUTYY(("P(server_keep_missing:%s)\n", $2));
|
||||
if(atoi($2) == 0 && strcmp($2, "0") != 0)
|
||||
yyerror("number expected");
|
||||
else cfg_parser->cfg->keep_missing = atoi($2);
|
||||
free($2);
|
||||
}
|
||||
;
|
||||
server_key_cache_size: VAR_KEY_CACHE_SIZE STRING_ARG
|
||||
{
|
||||
OUTYY(("P(server_key_cache_size:%s)\n", $2));
|
||||
|
|
|
|||
Loading…
Reference in a new issue