summaryrefslogtreecommitdiff
path: root/trackerlogic.h
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2024-03-30 00:34:28 +0100
committerDirk Engling <erdgeist@erdgeist.org>2024-03-30 00:34:28 +0100
commit5b98dcf3a36f43bf335f6888d9515bdb614cbd6d (patch)
tree2b30439cc44a34bc86ddc265db68eab1e7f151b8 /trackerlogic.h
parenta3251ffac76ea1211d52b97ee232b8171a47c13d (diff)
Limit ipv6 udp replies to an amount that does not create too large UDP packets. Credits to anonymous donor
Diffstat (limited to 'trackerlogic.h')
-rw-r--r--trackerlogic.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/trackerlogic.h b/trackerlogic.h
index ef59179..f235de8 100644
--- a/trackerlogic.h
+++ b/trackerlogic.h
@@ -44,6 +44,13 @@ typedef struct { ot_ip6 address; int bits; }
44 44
45#define OT_CLIENT_REQUEST_INTERVAL_RANDOM ( OT_CLIENT_REQUEST_INTERVAL - OT_CLIENT_REQUEST_VARIATION/2 + (int)( nrand48(ws->rand48_state) % OT_CLIENT_REQUEST_VARIATION ) ) 45#define OT_CLIENT_REQUEST_INTERVAL_RANDOM ( OT_CLIENT_REQUEST_INTERVAL - OT_CLIENT_REQUEST_VARIATION/2 + (int)( nrand48(ws->rand48_state) % OT_CLIENT_REQUEST_VARIATION ) )
46 46
47/* List of peers should fit in a single UDP packet (around 1200 bytes) */
48#ifdef WANT_V6
49#define OT_MAX_PEERS_UDP 66
50#else
51#define OT_MAX_PEERS_UDP 200
52#endif
53
47/* If WANT_MODEST_FULLSCRAPES is on, ip addresses may not 54/* If WANT_MODEST_FULLSCRAPES is on, ip addresses may not
48 fullscrape more frequently than this amount in seconds */ 55 fullscrape more frequently than this amount in seconds */
49#define OT_MODEST_PEER_TIMEOUT (60*5) 56#define OT_MODEST_PEER_TIMEOUT (60*5)