summaryrefslogtreecommitdiff
path: root/DESIGN
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2026-11-29 00:34:40 +0100
committerDirk Engling <erdgeist@erdgeist.org>2026-11-29 00:34:40 +0100
commit952da5949f677e932f2a48a5474210df571472fb (patch)
treed33525d29ee18b65b9e5df39d2e2fb1f5a868ca2 /DESIGN
parentf08e7473ac51a024f49e5101fbc5e150fecef2d4 (diff)
Warn about udp addresses already taken by other tracker instancesHEADmaster
Diffstat (limited to 'DESIGN')
-rw-r--r--DESIGN10
1 files changed, 10 insertions, 0 deletions
diff --git a/DESIGN b/DESIGN
index 2e1883e..7933223 100644
--- a/DESIGN
+++ b/DESIGN
@@ -214,6 +214,16 @@ packet arriving in that window created the torrent, and the saved state for it
214was then dropped on the exactmatch add_torrent_from_saved_state bails on, 214was then dropped on the exactmatch add_torrent_from_saved_state bails on,
215losing that torrent's completed count. 215losing that torrent's completed count.
216 216
217A udp address somebody else holds is warned about and bound all the same.
218Linux permits the second bind when both sockets set SO_REUSEADDR, which the
219tracker always does, and FreeBSD when both asked to share the port, which it
220does for a group of workers. The two then take or split each other's datagrams
221without either noticing. Every udp entry is probed before the first of them is
222bound, with a socket that asks for no sharing, so that an overlap within the
223tracker's own configuration is not mistaken for a stranger. TCP is not probed:
224there the bind itself fails unless a balanced group was asked for, and on
225Linux a probe would also trip over the connections a restart leaves behind.
226
217Teardown stops the cleaner first. It is the one worker that calls into other 227Teardown stops the cleaner first. It is the one worker that calls into other
218modules, accesslist_cleanup and stats_cleanup, so stopping it after them left 228modules, accesslist_cleanup and stats_cleanup, so stopping it after them left
219it locking a mutex accesslist_deinit had already destroyed: five shutdowns in 229it locking a mutex accesslist_deinit had already destroyed: five shutdowns in