]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- fix horrible oversight in sorting rrset references in a message,
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 31 Oct 2007 14:46:05 +0000 (14:46 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 31 Oct 2007 14:46:05 +0000 (14:46 +0000)
          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

18 files changed:
checkconf/unbound-checkconf.c
doc/Changelog
doc/example.conf
doc/unbound.conf.5
testcode/checklocks.c
testcode/testbound.c
testdata/04-checkconf.tpkg
testdata/fwd_compress_c00c.tpkg
testdata/fwd_no_edns.tpkg
testdata/fwd_tcp.tpkg
testdata/fwd_tcp_tc.tpkg
testdata/fwd_tcp_tc6.tpkg
testdata/fwd_three.tpkg
testdata/fwd_three_service.tpkg
testdata/fwd_ttlexpire.tpkg
testdata/fwd_udp.tpkg
util/config_file.c
util/data/msgreply.c

index ba4e20a92d7fe9737b4588ac2af77f33abcd9107..3a58aa759e163b64ca46f8a517761c76ca9cb975 100644 (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;
 }
index d024105ce45e545b7c8a269baa60351b967368ae..55b646a98b643a320e2f08a2b45ae4ae7ffdc344 100644 (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
index a96670758dcda3aaa7bb932ef1682346c76b6233..378f987f8e4e65805e224c9a31d521d7f620621c 100644 (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
index a3603339b58830d8ac235ae6e625d269e2976e7d..f05b3011a2addcebb18bf3e96710c16a9259a4a5 100644 (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 
index 3c56fe5cc8828146add6414228124c917af13445..405a406ecadb54a25bef2cbcc3751e593177983a 100644 (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;
 
index c7de18150899860430aa77c4b3a1ead82a6f8ab3..78b14aafbfb7be3af5aec499f4b00ddf86adc374 100644 (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)++;
index 66d5589a5748a63515f0dd9878ef0bfda17bed11..ad37e0925d0b15857bac8a6de6cf13bc9e2c81b5 100644 (file)
Binary files a/testdata/04-checkconf.tpkg and b/testdata/04-checkconf.tpkg differ
index 627cf92d497d3e00701c2381471715c17689e8bc..905bb1b3c0e617f2ac78d8c9561487bdf298f41c 100644 (file)
Binary files a/testdata/fwd_compress_c00c.tpkg and b/testdata/fwd_compress_c00c.tpkg differ
index 34962337e01db8a6a1fb5d5141fc7a931131e639..a12aaf90625123418d244f44f48443f58620b085 100644 (file)
Binary files a/testdata/fwd_no_edns.tpkg and b/testdata/fwd_no_edns.tpkg differ
index bef8747bc560fef3c741136041fe64ca4d3c0485..953ea18d766e2e45d732ee693df9e4e65358fe85 100644 (file)
Binary files a/testdata/fwd_tcp.tpkg and b/testdata/fwd_tcp.tpkg differ
index 1487a253aedc01fe69ebfccbe7207dbd63c573da..91f2977b35df9d03f2d0a477d91897761f13950b 100644 (file)
Binary files a/testdata/fwd_tcp_tc.tpkg and b/testdata/fwd_tcp_tc.tpkg differ
index df45e9e5b4d96cc74274bd1a3002d38cadfbf790..b25b94e4d91070b84139cfdf1cbe14c9669d35b4 100644 (file)
Binary files a/testdata/fwd_tcp_tc6.tpkg and b/testdata/fwd_tcp_tc6.tpkg differ
index 860b17a777ab694c3827766060ca922b166de541..09c84617a873931b7a7dfa57dde723d2a450fc1f 100644 (file)
Binary files a/testdata/fwd_three.tpkg and b/testdata/fwd_three.tpkg differ
index 983e47b7558797f64f58c9e16f2815fea7d7fdb2..b85d291b1593c1f6c826740bc6125eae46518922 100644 (file)
Binary files a/testdata/fwd_three_service.tpkg and b/testdata/fwd_three_service.tpkg differ
index 98e3f21d47efa99998955b7c39de07c44be01e2e..d478e5a97db90a294b995e3443040a62f46509db 100644 (file)
Binary files a/testdata/fwd_ttlexpire.tpkg and b/testdata/fwd_ttlexpire.tpkg differ
index d3c3986662c5ed3c2a7832d3d96b0a561345c4af..4dde7181d6a4c426ce954e56bea8152009581dad 100644 (file)
Binary files a/testdata/fwd_udp.tpkg and b/testdata/fwd_udp.tpkg differ
index 76d42968cc9e01ba17d55cf989edcf1c3a7844fb..99397d4e55275bccba99c1681a17d3081dc6c916 100644 (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;
index ea524e924020d0c5169344ab4e7ca5169d6ca37c..14196837ba3d497aa875ed098aaeb55f11477ba6 100644 (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;
 }