]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
nicer error, random() improved.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 19 Oct 2007 12:10:13 +0000 (12:10 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 19 Oct 2007 12:10:13 +0000 (12:10 +0000)
git-svn-id: file:///svn/unbound/trunk@707 be551aaa-1e26-0410-a405-d3ace91eadb9

daemon/daemon.c
doc/Changelog
services/outside_network.c

index 5447e9f290298cff384b73a2a28fde4b3832212d..c585ef0e3f76c774c22af0554933e365fb594940 100644 (file)
@@ -68,6 +68,8 @@ static int sig_record_reload = 0;
 static RETSIGTYPE record_sigh(int sig)
 {
 #ifdef LIBEVENT_SIGNAL_PROBLEM
+       verbose(VERB_OPS, "quit on signal, no cleanup and statistics, "
+               "because installed libevent version is not threadsafe");
        exit(0);
 #endif 
        switch(sig)
index e2ee3b98bc8950c8af8f0c66a0c2c211919b6c36..e9e8ac17eb5a3dda653c04e90ef5bd7ffd64977e 100644 (file)
@@ -11,6 +11,7 @@
        - ldns-src configure is done during unbound configure and
          ldns-src make is done during unbound make, and so inherits the
          make arguments from the unbound make invocation.
+       - nicer error when libevent problem causes instant exit on signal.
          
 18 October 2007: Wouter
        - addresses are logged with errors.
index 867f944118e543fe341fbd5bc1ae9f7cca703ada..4ccce3cde7c3a4ff3a11b96bff53e3b59fe1a085 100644 (file)
@@ -603,7 +603,6 @@ new_pending(struct outside_network* outnet, ldns_buffer* packet,
                return NULL;
        }
        /* set */
-       /* id uses lousy random() TODO use better and entropy */
        pend->id = ((unsigned)ub_random(rnd)>>8) & 0xffff;
        LDNS_ID_SET(ldns_buffer_begin(packet), pend->id);
        memcpy(&pend->addr, addr, addrlen);
@@ -655,7 +654,6 @@ select_port(struct outside_network* outnet, struct pending* pend,
        }
 
        /* choose a random outgoing port and interface */
-       /* TODO: entropy source. */
        precho = (double)ub_random(rnd) * (double)nummax / 
                ((double)RAND_MAX + 1.0);
        chosen = (int)precho;
@@ -765,7 +763,6 @@ pending_tcp_query(struct outside_network* outnet, ldns_buffer* packet,
        }
        w->pkt = NULL;
        w->pkt_len = 0;
-       /* id uses lousy random() TODO use better and entropy */
        id = ((unsigned)ub_random(rnd)>>8) & 0xffff;
        LDNS_ID_SET(ldns_buffer_begin(packet), id);
        memcpy(&w->addr, addr, addrlen);