Update docs to reflect decoupled trunk connections and implemented features
Connection handling docs still described the old priority-based tie-breaking
model removed in 3b7831c. Updated TRUNK_PROTOCOL.md, README.md to describe
the current dual-connection model (outbound preferred, inbound fallback).
Marked satellite and cluster TG features as implemented in design doc.
Added satellite files to TRUNK_PROTOCOL.md files-changed table.
This commit is contained in:
1 parent
eca3c71122
commit
8cf96f9ba5
3 files changed
+25
-19
No files matched your search
@@ -168,9 +168,10 @@ Repeat for each peer (`[TRUNK_3]`, `[TRUNK_4]`, …).
|
|||||||
|
|
||||||
**Trunk links** require **mutual reachability**: each reflector both listens for
|
**Trunk links** require **mutual reachability**: each reflector both listens for
|
||||||
inbound trunk connections and connects outbound to every peer. Both sides
|
inbound trunk connections and connects outbound to every peer. Both sides
|
||||||
attempt to connect simultaneously; the first connection that authenticates
|
attempt to connect simultaneously; outbound and inbound connections operate
|
||||||
becomes the active link (duplicate connections are resolved automatically via
|
independently and can both be active at the same time. When sending, the
|
||||||
priority-based tie-breaking). All reflectors in the mesh need a static IP (or
|
outbound connection is preferred with inbound as fallback. All reflectors in
|
||||||
|
the mesh need a static IP (or
|
||||||
stable DNS name) and the trunk port (default 5302, configurable via
|
stable DNS name) and the trunk port (default 5302, configurable via
|
||||||
`TRUNK_LISTEN_PORT`) open for inbound TCP connections.
|
`TRUNK_LISTEN_PORT`) open for inbound TCP connections.
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Design: Regional Satellites & Nationwide Cluster TGs
|
# Design: Regional Satellites & Nationwide Cluster TGs
|
||||||
|
|
||||||
Two proposed extensions to GeuReflector's trunk architecture. Each can be
|
Two extensions to GeuReflector's trunk architecture, both now fully
|
||||||
implemented independently.
|
implemented.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
+19
-14
@@ -140,7 +140,9 @@ directions:
|
|||||||
|
|
||||||
Each reflector both listens for inbound trunk connections on its trunk server
|
Each reflector both listens for inbound trunk connections on its trunk server
|
||||||
port (default 5302) and actively connects outbound to each configured peer.
|
port (default 5302) and actively connects outbound to each configured peer.
|
||||||
Whichever direction succeeds first becomes the active connection for that peer.
|
Outbound and inbound connections operate independently and can both be active
|
||||||
|
at the same time. When sending, the outbound connection is preferred; if it is
|
||||||
|
not ready, the inbound connection is used as fallback.
|
||||||
|
|
||||||
### Outbound connection
|
### Outbound connection
|
||||||
|
|
||||||
@@ -167,8 +169,8 @@ The trunk server (`Reflector::m_trunk_srv`) listens on the configured
|
|||||||
2. The server waits for a `MsgTrunkHello` frame
|
2. The server waits for a `MsgTrunkHello` frame
|
||||||
3. The shared secret is verified via HMAC against each configured `TrunkLink`
|
3. The shared secret is verified via HMAC against each configured `TrunkLink`
|
||||||
4. On match, the connection is handed off to the corresponding `TrunkLink`
|
4. On match, the connection is handed off to the corresponding `TrunkLink`
|
||||||
5. The `TrunkLink` pauses its own outbound connection attempts and uses the
|
5. The `TrunkLink` stores the inbound connection alongside any existing
|
||||||
inbound connection
|
outbound connection
|
||||||
|
|
||||||
**Security hardening:**
|
**Security hardening:**
|
||||||
- Pre-authentication frame size is limited to 4 KB (vs 32 KB post-auth)
|
- Pre-authentication frame size is limited to 4 KB (vs 32 KB post-auth)
|
||||||
@@ -178,25 +180,24 @@ The trunk server (`Reflector::m_trunk_srv`) listens on the configured
|
|||||||
- Peer identifiers are sanitized before logging (control characters stripped,
|
- Peer identifiers are sanitized before logging (control characters stripped,
|
||||||
length capped at 64)
|
length capped at 64)
|
||||||
|
|
||||||
### Connection Conflict Resolution
|
### Dual Connection Model
|
||||||
|
|
||||||
Because both sides connect outbound simultaneously, it is possible for both an
|
Each `TrunkLink` maintains two independent connections to the peer: an outbound
|
||||||
inbound and outbound connection to be active at the same time for the same peer.
|
connection (via `TcpPrioClient`) and an inbound connection (accepted by the
|
||||||
When this is detected, a deterministic tie-break resolves the conflict:
|
trunk server). Both can be active simultaneously. When sending messages, the
|
||||||
|
outbound connection is preferred; if it is not ready, the inbound connection is
|
||||||
|
used as fallback. Each connection has independent heartbeat timers.
|
||||||
|
|
||||||
- The side with the **lower** priority nonce keeps its **outbound** connection
|
If a second inbound connection arrives while one is already active, the new one
|
||||||
- The side with the higher priority nonce keeps the **inbound** connection
|
is rejected. Outbound reconnection is handled automatically by
|
||||||
- Both sides independently reach the same conclusion, so exactly one TCP
|
`TcpPrioClient`.
|
||||||
connection survives
|
|
||||||
|
|
||||||
This ensures convergence regardless of timing.
|
|
||||||
|
|
||||||
### `MsgTrunkHello` fields
|
### `MsgTrunkHello` fields
|
||||||
|
|
||||||
- `id` — the config section name (e.g. `TRUNK_2`), used for logging
|
- `id` — the config section name (e.g. `TRUNK_2`), used for logging
|
||||||
- `local_prefix` — the sender's authoritative TG prefix (e.g. `"1"`)
|
- `local_prefix` — the sender's authoritative TG prefix (e.g. `"1"`)
|
||||||
- `priority` — random 32-bit nonce, regenerated per connection, used for
|
- `priority` — random 32-bit nonce, regenerated per connection, used for
|
||||||
tie-breaking (both talker arbitration and connection conflict resolution)
|
talker arbitration tie-breaking
|
||||||
- `nonce` + `digest` — HMAC authentication of the shared secret
|
- `nonce` + `digest` — HMAC authentication of the shared secret
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -438,6 +439,10 @@ REMOTE_PREFIX=2
|
|||||||
| `src/svxlink/reflector/Reflector.cpp` | Wired trunk init, trunk server (listen + accept + auth), signals, audio relay, arbitration guard, HTTP status |
|
| `src/svxlink/reflector/Reflector.cpp` | Wired trunk init, trunk server (listen + accept + auth), signals, audio relay, arbitration guard, HTTP status |
|
||||||
| `src/svxlink/reflector/TrunkLink.h` | **New** — `TrunkLink` class declaration |
|
| `src/svxlink/reflector/TrunkLink.h` | **New** — `TrunkLink` class declaration |
|
||||||
| `src/svxlink/reflector/TrunkLink.cpp` | **New** — full trunk link implementation |
|
| `src/svxlink/reflector/TrunkLink.cpp` | **New** — full trunk link implementation |
|
||||||
|
| `src/svxlink/reflector/SatelliteLink.h` | **New** — `SatelliteLink` class declaration |
|
||||||
|
| `src/svxlink/reflector/SatelliteLink.cpp` | **New** — satellite link implementation (parent side) |
|
||||||
|
| `src/svxlink/reflector/SatelliteClient.h` | **New** — `SatelliteClient` class declaration |
|
||||||
|
| `src/svxlink/reflector/SatelliteClient.cpp` | **New** — satellite client implementation (satellite side) |
|
||||||
| `src/svxlink/reflector/CMakeLists.txt` | Added `TrunkLink.cpp` to sources |
|
| `src/svxlink/reflector/CMakeLists.txt` | Added `TrunkLink.cpp` to sources |
|
||||||
| `src/svxlink/reflector/svxreflector.conf.in` | Added prefix-based trunk example config |
|
| `src/svxlink/reflector/svxreflector.conf.in` | Added prefix-based trunk example config |
|
||||||
| `src/versions` | Version bumped to `1.3.99.12+trunk1` |
|
| `src/versions` | Version bumped to `1.3.99.12+trunk1` |
|
||||||
|
|||||||
Reference in new issue
Block a user