2
0
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:
Mukund Sivaraman
2012-03-19 17:43:57 +05:30
parent 823f30307b
commit 7b7252d044

View File

@@ -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);