Use xoshiro256** to generate pseudo-random numbers.
[tinc] / src / tincd.c
index 560609c..f9e31c1 100644 (file)
@@ -489,9 +489,9 @@ int main(int argc, char **argv) {
        unsetenv("LISTEN_PID");
 #endif
 
-       /* Slllluuuuuuurrrrp! */
-
+       gettimeofday(&now, NULL);
        crypto_init();
+       prng_init();
 
        if(!read_server_config(&config_tree)) {
                return 1;
@@ -544,9 +544,6 @@ int main2(int argc, char **argv) {
 #endif
        char *priority = NULL;
 
-       gettimeofday(&now, NULL);
-       srand(now.tv_sec + now.tv_usec);
-
        if(!detach()) {
                return 1;
        }