mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-31 05:55:28 +00:00
[1812] Initialize srandom() with seed other than 0 when not using a random seed
This is because random() always returns 0 on OpenBSD 5.0, when the RNG is initialized with srandom(0).
This commit is contained in:
@@ -101,7 +101,7 @@ Hash::Hash(uint32_t tablesize, uint32_t maxkeylen, bool randomise) :
|
||||
init_value.curtime = time(NULL);
|
||||
}
|
||||
else {
|
||||
init_value.seed = 0;
|
||||
init_value.seed = 1;
|
||||
}
|
||||
srandom(init_value.seed);
|
||||
|
||||
|
Reference in New Issue
Block a user