mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 07:08:19 +00:00
Add zeek::max_random() & fix misuse of RAND_MAX w/ zeek::random_number()
In deterministic mode, RAND_MAX is not related to the result of zeek::random_number() (formerly bro_random()), but some logic was using RAND_MAX as indication of the possible range of values. The new zeek::max_random() will give the correct upper-bound regardless of whether deterministic-mode is used.
This commit is contained in:
parent
bde38893ce
commit
d486af06b1
6 changed files with 24 additions and 9 deletions
|
@ -34,7 +34,7 @@ public:
|
|||
private:
|
||||
struct Filter {
|
||||
uint32_t tcp_flags;
|
||||
uint32_t probability;
|
||||
double probability;
|
||||
};
|
||||
|
||||
static void DeleteFilter(void* data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue