From: Mark Andrews Date: Wed, 27 Jun 2012 00:08:22 +0000 (+1000) Subject: 3343. [bug] Relax isc_random_jitter() REQUIRE tests. [RT# 19821] X-Git-Tag: v9.6-ESV-R7-P2~4 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=79e7fdd8dc158a221fdf9154dd9dcba15045ef14;p=thirdparty%2Fbind9.git 3343. [bug] Relax isc_random_jitter() REQUIRE tests. [RT# 19821] --- diff --git a/CHANGES b/CHANGES index 1d77c75f89f..59e8622464d 100644 --- 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] diff --git a/lib/isc/random.c b/lib/isc/random.c index 37c56198c4c..d49a5d74ed4 100644 --- a/lib/isc/random.c +++ b/lib/isc/random.c @@ -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);