projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cfe507c
)
Slightly better RNG seed for tincctl.
author
Guus Sliepen
<guus@tinc-vpn.org>
Tue, 20 Jul 2021 18:31:49 +0000
(20:31 +0200)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Tue, 20 Jul 2021 18:31:49 +0000
(20:31 +0200)
This prevents the Port from being the same when initializing multiple
instances of tinc in a short timespan.
src/tincctl.c
patch
|
blob
|
history
diff --git
a/src/tincctl.c
b/src/tincctl.c
index
a6b400b
..
de171e6
100644
(file)
--- a/
src/tincctl.c
+++ b/
src/tincctl.c
@@
-3374,7
+3374,8
@@
int main(int argc, char *argv[]) {
#endif
- srand(time(NULL));
+ gettimeofday(&now, NULL);
+ srand(now.tv_sec + now.tv_usec);
crypto_init();
if(optind >= argc) {