mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
unbound-checkconf test.
git-svn-id: file:///svn/unbound/trunk@649 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
dc34bb36b3
commit
1115d50dce
5 changed files with 17 additions and 2 deletions
|
|
@ -46,6 +46,7 @@
|
|||
#include "util/log.h"
|
||||
#include "util/config_file.h"
|
||||
#include "util/module.h"
|
||||
#include "util/net_help.h"
|
||||
#include "util/region-allocator.h"
|
||||
#include "iterator/iterator.h"
|
||||
#include "validator/validator.h"
|
||||
|
|
@ -85,6 +86,16 @@ check_mod(struct config_file* cfg, struct module_func_block* fb)
|
|||
static void
|
||||
morechecks(struct config_file* cfg)
|
||||
{
|
||||
int i;
|
||||
for(i=0; i<cfg->num_ifs; i++) {
|
||||
struct sockaddr_storage a;
|
||||
socklen_t alen;
|
||||
if(!ipstrtoaddr(cfg->ifs[i], UNBOUND_DNS_PORT, &a, &alen)) {
|
||||
fatal_exit("cannot parse interface specified as '%s'",
|
||||
cfg->ifs[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if(cfg->verbosity < 0)
|
||||
fatal_exit("verbosity value < 0");
|
||||
if(cfg->num_threads < 0 || cfg->num_threads > 10000)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
28 September 2007: Wouter
|
||||
- test case for unbound-checkconf, fixed so it also checks the
|
||||
interface: statements.
|
||||
|
||||
26 September 2007: Wouter
|
||||
- SIGHUP will reopen the log file.
|
||||
- Option to log to syslog.
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ donotq_insert(struct iter_donotq* dq, struct sockaddr_storage* addr,
|
|||
memcpy(&node->addr, addr, addrlen);
|
||||
node->addrlen = addrlen;
|
||||
if(!rbtree_insert(dq->tree, &node->node)) {
|
||||
log_warn("duplicate donotquery address ignored.");
|
||||
verbose(VERB_DETAIL, "duplicate donotquery address ignored.");
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
BIN
testdata/04-checkconf.tpkg
vendored
Normal file
BIN
testdata/04-checkconf.tpkg
vendored
Normal file
Binary file not shown.
|
|
@ -143,7 +143,7 @@ hide-identity{COLON} { YDOUT; return VAR_HIDE_IDENTITY;}
|
|||
hide-version{COLON} { YDOUT; return VAR_HIDE_VERSION;}
|
||||
identity{COLON} { YDOUT; return VAR_IDENTITY;}
|
||||
version{COLON} { YDOUT; return VAR_VERSION;}
|
||||
module-conf{COLON} { YDOUT; return VAR_MODULE_CONF;}
|
||||
module-config{COLON} { YDOUT; return VAR_MODULE_CONF;}
|
||||
trust-anchor-file{COLON} { YDOUT; return VAR_TRUST_ANCHOR_FILE;}
|
||||
trusted-keys-file{COLON} { YDOUT; return VAR_TRUSTED_KEYS_FILE;}
|
||||
trust-anchor{COLON} { YDOUT; return VAR_TRUST_ANCHOR;}
|
||||
|
|
|
|||
Loading…
Reference in a new issue