- get_option, set_option, unbound-checkconf -o and libunbound

getoption and setoption support cache-min-ttl and cache-max-ttl.


git-svn-id: file:///svn/unbound/trunk@2910 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2013-06-13 08:26:41 +00:00
parent f7bf35b23a
commit 4af730847c
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,7 @@
13 Jun 2013: Wouter
- get_option, set_option, unbound-checkconf -o and libunbound
getoption and setoption support cache-min-ttl and cache-max-ttl.
10 Jun 2013: Wouter 10 Jun 2013: Wouter
- Fix#501: forward-first does not recurse, when forward name is ".". - Fix#501: forward-first does not recurse, when forward name is ".".
- iana portlist update. - iana portlist update.

View file

@ -360,7 +360,10 @@ int config_set_option(struct config_file* cfg, const char* opt,
else S_POW2("rrset-cache-slabs:", rrset_cache_slabs) else S_POW2("rrset-cache-slabs:", rrset_cache_slabs)
else S_YNO("prefetch:", prefetch) else S_YNO("prefetch:", prefetch)
else S_YNO("prefetch-key:", prefetch_key) else S_YNO("prefetch-key:", prefetch_key)
else S_NUMBER_OR_ZERO("cache-max-ttl:", max_ttl) else if(strcmp(opt, "cache-max-ttl:") == 0)
{ IS_NUMBER_OR_ZERO; cfg->max_ttl = atoi(val); MAX_TTL=cfg->max_ttl;}
else if(strcmp(opt, "cache-min-ttl:") == 0)
{ IS_NUMBER_OR_ZERO; cfg->min_ttl = atoi(val); MIN_TTL=cfg->min_ttl;}
else S_NUMBER_OR_ZERO("infra-host-ttl:", host_ttl) else S_NUMBER_OR_ZERO("infra-host-ttl:", host_ttl)
else S_POW2("infra-cache-slabs:", infra_cache_slabs) else S_POW2("infra-cache-slabs:", infra_cache_slabs)
else S_SIZET_NONZERO("infra-cache-numhosts:", infra_cache_numhosts) else S_SIZET_NONZERO("infra-cache-numhosts:", infra_cache_numhosts)
@ -596,6 +599,7 @@ config_get_option(struct config_file* cfg, const char* opt,
else O_YNO(opt, "prefetch-key", prefetch_key) else O_YNO(opt, "prefetch-key", prefetch_key)
else O_YNO(opt, "prefetch", prefetch) else O_YNO(opt, "prefetch", prefetch)
else O_DEC(opt, "cache-max-ttl", max_ttl) else O_DEC(opt, "cache-max-ttl", max_ttl)
else O_DEC(opt, "cache-min-ttl", min_ttl)
else O_DEC(opt, "infra-host-ttl", host_ttl) else O_DEC(opt, "infra-host-ttl", host_ttl)
else O_DEC(opt, "infra-cache-slabs", infra_cache_slabs) else O_DEC(opt, "infra-cache-slabs", infra_cache_slabs)
else O_MEM(opt, "infra-cache-numhosts", infra_cache_numhosts) else O_MEM(opt, "infra-cache-numhosts", infra_cache_numhosts)