aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2012-01-04 13:19:29 +0100
committerTobias Brunner <tobias@strongswan.org>2012-01-04 13:19:29 +0100
commit190cd8a475ee099b4e8fe6459556f2a0fecb2d7c (patch)
tree10f91c7a0822f8eee595f5519ed5f01ffb007e24 /src
parentf8b2906929435d439450d8ac607d8d788d66a502 (diff)
downloadstrongswan-190cd8a475ee099b4e8fe6459556f2a0fecb2d7c.tar.bz2
strongswan-190cd8a475ee099b4e8fe6459556f2a0fecb2d7c.tar.xz
pluto: Use srand() to initialize the C library PRNG.
Otherwise rekey and DPD times would always be the same after a restart.
Diffstat (limited to 'src')
-rw-r--r--src/pluto/plutomain.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pluto/plutomain.c b/src/pluto/plutomain.c
index 2e046ec0b..0f2844813 100644
--- a/src/pluto/plutomain.c
+++ b/src/pluto/plutomain.c
@@ -675,6 +675,9 @@ int main(int argc, char **argv)
close(fd);
}
+ /* for uncritical pseudo random numbers */
+ srand(time(NULL) + getpid());
+
init_constants();
init_log("pluto");