summaryrefslogtreecommitdiff
path: root/proxy.c
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2026-10-24 01:50:25 +0200
committerDirk Engling <erdgeist@erdgeist.org>2026-10-24 01:50:25 +0200
commitecb1f1e92ab449023d1427f9db26c5bac09c4901 (patch)
tree5af48da0cac32e2927aa5e2946c9f08173fedb69 /proxy.c
parente4b6decf72a91453bc8d31b4b15e7aed923c56d2 (diff)
Use new entropy fascility and add tests for it
Diffstat (limited to 'proxy.c')
-rw-r--r--proxy.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/proxy.c b/proxy.c
index cec985e..d728e5b 100644
--- a/proxy.c
+++ b/proxy.c
@@ -25,6 +25,7 @@
25 25
26/* Opentracker */ 26/* Opentracker */
27#include "ot_mutex.h" 27#include "ot_mutex.h"
28#include "ot_random.h"
28#include "ot_stats.h" 29#include "ot_stats.h"
29#include "ot_vector.h" 30#include "ot_vector.h"
30#include "trackerlogic.h" 31#include "trackerlogic.h"
@@ -563,12 +564,8 @@ int main(int argc, char **argv) {
563 uint16_t tmpport; 564 uint16_t tmpport;
564 int scanon = 1, lbound = 0, sbound = 0; 565 int scanon = 1, lbound = 0, sbound = 0;
565 566
566 srandom(time(NULL)); 567 random_init();
567#ifdef WANT_ARC4RANDOM 568 g_tracker_id = random_uint32();
568 g_tracker_id = arc4random();
569#else
570 g_tracker_id = random();
571#endif
572 569
573 while (scanon) { 570 while (scanon) {
574 switch (getopt(argc, argv, ":l:c:L:h")) { 571 switch (getopt(argc, argv, ":l:c:L:h")) {