summaryrefslogtreecommitdiffstats
path: root/src/fastd.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-08-01 22:12:56 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-08-01 22:12:56 +0200
commit5f385b0ea01865834214dae79afa557f37f9c275 (patch)
treef5a5dc1a0800d52ef3190c1e0b08b93e0f7e66c0 /src/fastd.c
parentebcf28b9ab43d71179535df61896aa8baa4cdb27 (diff)
downloadfastd-5f385b0ea01865834214dae79afa557f37f9c275.tar
fastd-5f385b0ea01865834214dae79afa557f37f9c275.zip
Use srandom/random instead of rand_r
There's no need to keep our own seed.
Diffstat (limited to 'src/fastd.c')
-rw-r--r--src/fastd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fastd.c b/src/fastd.c
index eff605e..e0d4bb2 100644
--- a/src/fastd.c
+++ b/src/fastd.c
@@ -460,7 +460,9 @@ static inline void notify_systemd(void) {
static inline void init_early(void) {
fastd_close_all_fds();
- fastd_random_bytes(&ctx.randseed, sizeof(ctx.randseed), false);
+ unsigned int seed;
+ fastd_random_bytes(&seed, sizeof(seed), false);
+ srandom(seed);
fastd_cipher_init();
fastd_mac_init();