mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-02 23:15:20 +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);
|
init_value.curtime = time(NULL);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
init_value.seed = 0;
|
init_value.seed = 1;
|
||||||
}
|
}
|
||||||
srandom(init_value.seed);
|
srandom(init_value.seed);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user