]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
3343. [bug] Relax isc_random_jitter() REQUIRE tests. [RT# 19821]
authorMark Andrews <marka@isc.org>
Wed, 27 Jun 2012 00:08:22 +0000 (10:08 +1000)
committerMark Andrews <marka@isc.org>
Wed, 27 Jun 2012 00:08:22 +0000 (10:08 +1000)
CHANGES
lib/isc/random.c

diff --git a/CHANGES b/CHANGES
index 1d77c75f89f4f45054bee4841468ff62a7629cbe..59e8622464d3b0253e6233af5e216c9263f18926 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+3343.   [bug]          Relax isc_random_jitter() REQUIRE tests. [RT# 19821]
+
 3342.  [bug]           Change #3314 broke saving of stub zones to disk
                        resulting in excessive cpu usage in some cases.
                        [RT #29952]
index 37c56198c4c661373d87a2a5bf9467157346da12..d49a5d74ed4b3ad051034448be8a40127a9a94bb 100644 (file)
@@ -103,7 +103,7 @@ isc_uint32_t
 isc_random_jitter(isc_uint32_t max, isc_uint32_t jitter) {
        isc_uint32_t rnd;
 
-       REQUIRE(jitter < max);
+       REQUIRE(jitter < max || (jitter == 0 && max == 0));
 
        if (jitter == 0)
                return (max);