]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[v9_9] fix PRNG selection in dispatch.c
authorEvan Hunt <each@isc.org>
Tue, 10 Feb 2015 21:55:21 +0000 (13:55 -0800)
committerEvan Hunt <each@isc.org>
Tue, 10 Feb 2015 21:55:21 +0000 (13:55 -0800)
4058. [bug] UDP dispatches could use the wrong psuedorandom
number generator context. [RT #38578]

CHANGES
lib/dns/dispatch.c

diff --git a/CHANGES b/CHANGES
index ef3d5bc733555079329f63ced21f0f09303b0ffd..e36ca09b1f23fff59d418a326f9f312bf888b623 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+4058.  [bug]           UDP dispatches could use the wrong psuedorandom
+                       number generator context. [RT #38578]
+
 4056.  [bug]           Fixed several small bugs in automatic trust anchor
                        management, including a memory leak and a possible 
                        loss of key state information. [RT #38458]
index bb38b8739cf122a3fad7fd43cac090ca134d9e05..1890f7c132b03753ea282fb38e3193314790ef38 100644 (file)
@@ -3038,6 +3038,8 @@ dispatch_createudp(dns_dispatchmgr_t *mgr, isc_socketmgr_t *sockmgr,
        if (result != ISC_R_SUCCESS)
                return (result);
 
+       disp->socktype = isc_sockettype_udp;
+
        if ((attributes & DNS_DISPATCHATTR_EXCLUSIVE) == 0) {
                result = get_udpsocket(mgr, disp, sockmgr, localaddr, &sock,
                                       dup_socket);
@@ -3087,7 +3089,6 @@ dispatch_createudp(dns_dispatchmgr_t *mgr, isc_socketmgr_t *sockmgr,
                isc_mempool_setname(disp->portpool, "disp_portpool");
                isc_mempool_setfreemax(disp->portpool, 128);
        }
-       disp->socktype = isc_sockettype_udp;
        disp->socket = sock;
        disp->local = *localaddr;