Fix trunk receive-side TG filtering and add integration test suite

The receive-side handlers (handleMsgTrunkTalkerStart, handleMsgTrunkAudio,
etc.) used isSharedTG() which only checks the remote peer's prefix. This
caused non-cluster TGs to be silently dropped on the receiving reflector —
e.g. a client on reflector-a talking on TG 40001 (owned by reflector-b)
would never reach reflector-b because reflector-b checked the TG against
reflector-a's prefix instead of its own.

Add isOwnedTG() that accepts TGs matching either the local or remote
prefix, and use it in all four receive handlers. The send-side still uses
isSharedTG() (remote prefix only) which is correct.

Also add a Docker-based integration test suite (tests/) with 11 automated
tests covering handshake, routing, cross-reflector audio delivery, cluster
TGs, heartbeat, disconnect cleanup, and trunk-to-trunk isolation. An
interactive mode lets users test arbitrary TG numbers with routing verified
via reflector logs. Topology is defined once in tests/topology.py.

Fix Dockerfile to copy built shared libraries to the runtime image.
This commit is contained in:
Audric committed 2026-03-27 14:43:57 +01:00
1 parent 3b7831c307
commit 685d7253ff
12 files changed
+1501 -16

No files matched your search

+2 -1
View File
@@ -64,7 +64,8 @@ TRUNK_2: Trunk hello from peer 'TRUNK_1' local_prefix=2 priority=3847291042
| 5300 | TCP | SvxLink client connections |
| 5300 | UDP | SvxLink client audio |
| 5302 | TCP | Server-to-server trunk links |
| 8080 | TCP | HTTP `/status` endpoint (optional) |
| 5303 | TCP | Satellite connections (optional) |
| 8080 | TCP | HTTP `/status` and `/config` endpoints (optional) |
If you do not set `HTTP_SRV_PORT` in the config, remove the `8080` port mapping
from `docker-compose.yml`.