aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/library.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/library.c')
-rw-r--r--src/libstrongswan/library.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libstrongswan/library.c b/src/libstrongswan/library.c
index b06a2d5a5..c5850e155 100644
--- a/src/libstrongswan/library.c
+++ b/src/libstrongswan/library.c
@@ -242,6 +242,7 @@ bool library_init(char *settings, const char *namespace)
{
private_library_t *this;
printf_hook_t *pfh;
+ static bool seeded = FALSE;
if (lib)
{ /* already initialized, increase refcount */
@@ -250,6 +251,14 @@ bool library_init(char *settings, const char *namespace)
return !this->integrity_failed;
}
+ if (!seeded)
+ {
+ /* we do this just once to allow hash table lifetimes longer than
+ * one init/deinit cycle. */
+ seeded = TRUE;
+ chunk_hash_seed();
+ }
+
INIT(this,
.public = {
.get = _get,