docs: clarify cluster TG subscription model and satellite TG filtering

Cluster TGs are a per-reflector subscription choice, not a mesh-wide
requirement. Document that satellites forward all TGs unconditionally
with no prefix or cluster TG filtering.
This commit is contained in:
Audric committed 2026-03-24 16:59:42 +01:00
1 parent b958a53ab3
commit dda6ac5531
3 files changed
+73 -9

No files matched your search

+20 -5
View File
@@ -118,8 +118,17 @@ transmission on a cluster TG and all other reflectors in the mesh will hear it.
CLUSTER_TGS=222,2221,91 # comma-separated list of cluster TG numbers CLUSTER_TGS=222,2221,91 # comma-separated list of cluster TG numbers
``` ```
All reflectors in the mesh should list the same cluster TGs. Cluster TG numbers Each reflector owner chooses which cluster TGs to subscribe to. A reflector only
must not overlap with any `LOCAL_PREFIX` or `REMOTE_PREFIX`. sends and accepts traffic for cluster TGs listed in its own `CLUSTER_TGS`. If
reflector A subscribes to TG 222 but reflector B does not, A will send TG 222
traffic to B, but B will ignore it — this is normal operation, not a
misconfiguration. Only reflectors that both subscribe to a given cluster TG will
exchange audio for it.
Cluster TG numbers must not overlap with any `LOCAL_PREFIX` or `REMOTE_PREFIX`.
**Note:** Satellite links are unaffected by cluster TG configuration — they
forward all TGs unconditionally (see [Satellite reflectors](#satellite-reflectors)).
### 3. Add a trunk section per peer ### 3. Add a trunk section per peer
@@ -241,9 +250,15 @@ SATELLITE_SECRET=regional_satellite_secret
SATELLITE_ID=my-satellite SATELLITE_ID=my-satellite
``` ```
A satellite does not set `LOCAL_PREFIX`, `REMOTE_PREFIX`, or any `[TRUNK_x]` A satellite does not set `LOCAL_PREFIX`, `REMOTE_PREFIX`, `CLUSTER_TGS`, or any
sections. It inherits its parent's identity. Remote reflectors in the mesh see `[TRUNK_x]` sections. It inherits its parent's identity. Remote reflectors in
satellite clients as if they were connected directly to the parent. the mesh see satellite clients as if they were connected directly to the parent.
**No TG filtering:** Unlike trunk links (which filter by prefix and cluster TG),
satellite links forward **all** audio and talker signaling in both directions
without any TG filtering. The satellite is a transparent relay — every TG active
on the parent is heard on the satellite and vice versa, regardless of
`CLUSTER_TGS` or prefix configuration.
Port `5303` is the default satellite port (separate from client port `5300` and Port `5303` is the default satellite port (separate from client port `5300` and
trunk port `5302`). trunk port `5302`).
+13 -4
View File
@@ -80,10 +80,11 @@ Similar to `TrunkLink` but with different semantics:
| Aspect | TrunkLink (peer-to-peer) | SatelliteLink | | Aspect | TrunkLink (peer-to-peer) | SatelliteLink |
|--------|-------------------------|---------------| |--------|-------------------------|---------------|
| Topology | Symmetric mesh peers | Asymmetric — parent is authority | | Topology | Symmetric mesh peers | Asymmetric — parent is authority |
| TG routing | Prefix-based (`isSharedTG`) | **All TGs** — satellite proxies everything | | TG routing | Prefix-based (`isSharedTG`) + cluster (`isClusterTG`) | **No filtering** — all TGs forwarded unconditionally |
| Talker arbitration | Nonce tie-break | Parent always wins | | Talker arbitration | Nonce tie-break | Parent always wins |
| Who initiates | Both sides connect to each other | Satellite connects to parent | | Who initiates | Both sides connect to each other | Satellite connects to parent |
| Audio path | Only shared-prefix TGs | All TGs active on either side | | Audio path | Only prefix-matched + cluster TGs | All TGs active on either side |
| `CLUSTER_TGS` config needed | Yes, must match on both sides | Not required |
#### Parent-side changes (`Reflector.cpp`) #### Parent-side changes (`Reflector.cpp`)
@@ -203,8 +204,16 @@ LOCAL_PREFIX=01
CLUSTER_TGS=222,2221,2222,91 CLUSTER_TGS=222,2221,2222,91
``` ```
All reflectors in the mesh must list the same cluster TG set. A TG number Each reflector owner chooses which cluster TGs to subscribe to. The cluster TG
cannot be both a cluster TG and match a `LOCAL_PREFIX`/`REMOTE_PREFIX`. check is applied independently on both the sending and receiving side of each
trunk link. If a cluster TG is declared on one side but not the other, the
receiving side silently ignores the traffic — this is normal operation, not a
misconfiguration. Only reflectors that both subscribe to a given cluster TG will
exchange audio for it. A TG number cannot be both a cluster TG and match a
`LOCAL_PREFIX`/`REMOTE_PREFIX`.
**Note:** Satellite links are not affected by `CLUSTER_TGS` — they forward all
TGs unconditionally regardless of configuration.
### Implementation ### Implementation
+40
View File
@@ -65,6 +65,46 @@ at reflector B and carries only TGs whose decimal string starts with B's prefix
(`REMOTE_PREFIX`). No multi-hop routing is needed because every pair has a (`REMOTE_PREFIX`). No multi-hop routing is needed because every pair has a
direct trunk. direct trunk.
### Cluster TGs
Cluster TGs bypass prefix routing entirely. A TG listed in `CLUSTER_TGS` is
forwarded to **all** trunk peers regardless of `LOCAL_PREFIX` or `REMOTE_PREFIX`.
The routing decision in `TrunkLink` is:
```
if isClusterTG(tg) → forward (regardless of prefix)
else if isSharedTG(tg) → forward (prefix match)
else → drop silently
```
This check is applied **independently on both sides** of each trunk link:
- **Sending side:** `TrunkLink::onLocalTalkerStart`, `onLocalAudio`, and
`onLocalFlush` check `isSharedTG(tg) || isClusterTG(tg)` before sending.
- **Receiving side:** `TrunkLink::handleMsgTrunkTalkerStart`,
`handleMsgTrunkAudio`, and `handleMsgTrunkFlush` perform the same check
before accepting.
Each reflector owner chooses which cluster TGs to subscribe to. A reflector
only sends and accepts traffic for cluster TGs listed in its own `CLUSTER_TGS`.
If a cluster TG is declared on the sending reflector but not the receiving one,
the receiving side silently ignores the traffic — this is normal operation, not
a misconfiguration. Only reflectors that both subscribe to a given cluster TG
will exchange audio for it.
### Satellite Links — No TG Filtering
Satellite links (`SatelliteClient` / `SatelliteLink`) do **not** apply any TG
filtering. All talker signaling and audio is forwarded unconditionally in both
directions:
| Aspect | Trunk link | Satellite link |
|--------|-----------|----------------|
| Prefix filtering (`isSharedTG`) | Yes | No |
| Cluster filtering (`isClusterTG`) | Yes | No |
| What is forwarded | Only prefix-matched + cluster TGs | All TGs |
| `CLUSTER_TGS` config needed | Yes, on both sides | No |
--- ---
## Connection and Handshake ## Connection and Handshake