diff options
author | Tobias Brunner <tobias@strongswan.org> | 2012-01-04 13:19:29 +0100 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2012-01-04 13:19:29 +0100 |
commit | 190cd8a475ee099b4e8fe6459556f2a0fecb2d7c (patch) | |
tree | 10f91c7a0822f8eee595f5519ed5f01ffb007e24 | |
parent | f8b2906929435d439450d8ac607d8d788d66a502 (diff) | |
download | strongswan-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.
-rw-r--r-- | src/pluto/plutomain.c | 3 |
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"); |