- fix horrible oversight in sorting rrset references in a message,

sort per reference key pointer, not on referencepointer itself.
        - pidfile: "/etc/unbound/unbound.pid" is now the default.
        - tests changed to reflect the updated default.


git-svn-id: file:///svn/unbound/trunk@724 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2007-10-31 14:46:05 +00:00
parent 2e9785cfb5
commit f79c387f3f
18 changed files with 25 additions and 8 deletions

View file

@ -173,6 +173,7 @@ int main(int argc, char* argv[])
int c;
log_ident_set("unbound-checkconf");
log_init(NULL, 0, NULL);
checklock_start();
/* parse the options */
while( (c=getopt(argc, argv, "h")) != -1) {
switch(c) {
@ -187,5 +188,6 @@ int main(int argc, char* argv[])
if(argc != 1)
usage();
checkconf(argv[0]);
checklock_stop();
return 0;
}

View file

@ -5,6 +5,10 @@
username: "unbound"
chroot: "/etc/unbound"
The operator can override them to be less secure ("") if necessary.
- fix horrible oversight in sorting rrset references in a message,
sort per reference key pointer, not on referencepointer itself.
- pidfile: "/etc/unbound/unbound.pid" is now the default.
- tests changed to reflect the updated default.
30 October 2007: Wouter
- fixup assertion failure that relied on compressed names to be

View file

@ -134,7 +134,7 @@ server:
# use-syslog: yes
# the pid file.
# pidfile: "unbound.pid"
# pidfile: "/etc/unbound/unbound.pid"
# file to read root hints from.
# get one from ftp://FTP.INTERNIC.NET/domain/named.cache

View file

@ -181,9 +181,16 @@ The log facility LOG_DAEMON is used, with identity "unbound".
The logfile setting is overridden when use-syslog is turned on.
The default is to log to syslog.
.It \fBpidfile:\fR <filename>
The process id is written to the file. Default is "unbound.pid". So,
kill -HUP `cat /etc/unbound/unbound.pid` will trigger a reload,
kill -QUIT `cat /etc/unbound/unbound.pid` will gracefully terminate.
The process id is written to the file. Default is "/etc/unbound/unbound.pid".
So,
.nf
kill -HUP `cat /etc/unbound/unbound.pid`
.fi
triggers a reload,
.nf
kill -QUIT `cat /etc/unbound/unbound.pid`
.fi
gracefully terminates.
.It \fBroot-hints:\fR <filename>
Read the root hints from this file. Default is nothing, using builtin hints
for the IN class. The file has the format of zone files, with root

View file

@ -63,7 +63,7 @@ static ub_thread_key_t thr_debug_key;
/** the list of threads, so all threads can be examined. NULL if unused. */
static struct thr_check* thread_infos[THRDEBUG_MAX_THREADS];
/** do we check locking order */
int check_locking_order = 0;
int check_locking_order = 1;
/** the pid of this runset, reasonably unique. */
static pid_t check_lock_pid;

View file

@ -140,6 +140,7 @@ setup_config(FILE* in, char* configfile, int* lineno,
fprintf(cfg, " directory: \"\"\n");
fprintf(cfg, " chroot: \"\"\n");
fprintf(cfg, " username: \"\"\n");
fprintf(cfg, " pidfile: \"\"\n");
while(fgets(line, MAX_LINE_LEN-1, in)) {
parse = line;
(*lineno)++;

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
testdata/fwd_tcp.tpkg vendored

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
testdata/fwd_udp.tpkg vendored

Binary file not shown.

View file

@ -97,7 +97,8 @@ config_create()
if(!(cfg->chrootdir = strdup("/etc/unbound"))) goto error_exit;
if(!(cfg->directory = strdup("/etc/unbound"))) goto error_exit;
if(!(cfg->logfile = strdup(""))) goto error_exit;
if(!(cfg->pidfile = strdup("unbound.pid"))) goto error_exit;
if(!(cfg->pidfile = strdup("/etc/unbound/unbound.pid")))
goto error_exit;
if(!(cfg->target_fetch_policy = strdup("3 2 1 0 0"))) goto error_exit;
cfg->donotqueryaddrs = NULL;
cfg->donotquery_localhost = 1;

View file

@ -421,8 +421,10 @@ int reply_info_parse(ldns_buffer* pkt, struct alloc_cache* alloc,
static int
reply_info_sortref_cmp(const void* a, const void* b)
{
if(a < b) return -1;
if(a > b) return 1;
struct rrset_ref* x = (struct rrset_ref*)a;
struct rrset_ref* y = (struct rrset_ref*)b;
if(x->key < y->key) return -1;
if(x->key > y->key) return 1;
return 0;
}