From c6732a03cbf0efa815e8a857af8118878c053af0 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Thu, 5 Nov 2026 18:18:45 +0100 Subject: Answer blacklisted torrent announces with an empty packet, that carries a re-announce timeout --- src/ot_udp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/ot_udp.c') diff --git a/src/ot_udp.c b/src/ot_udp.c index e67ca1f..9e8e3c4 100644 --- a/src/ot_udp.c +++ b/src/ot_udp.c @@ -176,11 +176,13 @@ int handle_udp6(int64_t serversocket, struct ot_workstruct *ws) { ws->reply = ws->outbuf + 8; ws->reply_size = add_peer_to_torrent_and_return_peers(FLAG_UDP, ws, numwant); + /* The announce path answers a refusal itself, so nothing is left here + but a tracker that could not get the memory to track the torrent */ if (!ws->reply_size) { - const char err_unauth[] = "Requested download is not authorized for use with this tracker."; - size_t s = sizeof(err_unauth); + const char err_resources[] = "Tracker is out of resources, try again later."; + size_t s = sizeof(err_resources); outpacket[0] = htonl(3); - memcpy(&outpacket[2], &err_unauth[0], s); + memcpy(&outpacket[2], &err_resources[0], s); socket_send(serversocket, ws->outbuf, 8 + s, remoteip, remoteport); return 1; } -- cgit v1.3