sat: full partner-node parity across reflector + satellites
Extends MsgTrunkNodeList (type 121) with a 7th vector `sat_ids` so a
parent reflector can advertise both its own clients (sat_id="") and
clients learned from each connected satellite (sat_id=<satellite_id>)
in a single message. The sat_id is recipient-relative — empty means
"on whoever sent this list" — so the same field is reused on the
trunk, twin and satellite paths without a global namespace.
Reflector::sendNodeListToAllPeers now builds a combined view (parent-
local + every connected satellite's stamped roster) and fans it out:
- to trunks and twin: full combined list
- to each satellite: combined minus that sat's own contribution,
additionally filtered by SATELLITE_FILTER (self-echo guard +
audio-path scoping)
- up to the parent (when running as a satellite): local clients only
SatelliteLink (parent side) and SatelliteClient (sat side) gain
sendNodeList / handleMsgTrunkNodeList wired into the type-121 dispatch.
Parent stamps each ingested entry with the SatelliteLink's id, then
schedules a debounced re-broadcast so trunk peers and sibling sats see
the new contribution. /status now exposes:
- parent: /status.satellites[<id>].nodes (per-sat partner roster)
- parent: /status.trunks[*].nodes[*].sat_id (attribution)
- satellite: /status.satellite.parent_nodes (parent's combined view)
Result: refA, S1, S2 all render the same set of callsigns, with each
entry tagged so consumers can tell where it physically lives.
Wire-format note: this is the second lockstep bump on type 121 within
~24h of a3757ca. Peers running an older fork build will fail to unpack
and silently empty their partner roster until upgraded; pre-jay peers
keep ignoring it.
Tests: 35 → 39. Three /status-level checks (sat-attached client visible
on parent, on far-trunk peer with sat_id, parent-local visible on
satellite) plus a multi-sat wire-level cross-visibility test that
verifies sat_id stamping and the self-echo guard.
This commit is contained in:
1 parent
d9ec356f10
commit
3d281e16d7
10 files changed
+761
-41
No files matched your search
@@ -571,6 +571,7 @@ Json::Value TrunkLink::statusJson(void) const
|
||||
entry["lon"] = n.lon;
|
||||
}
|
||||
if (!n.qth_name.empty()) entry["qth_name"] = n.qth_name;
|
||||
if (!n.sat_id.empty()) entry["sat_id"] = n.sat_id;
|
||||
// Derive isTalker from the live trunk-talker map maintained by
|
||||
// MsgTrunkTalkerStart/Stop. Authoritative for partner nodes; the
|
||||
// sender's own isTalker is stale by the time it arrives in the
|
||||
@@ -1837,6 +1838,10 @@ void TrunkLink::handleMsgTrunkNodeList(std::istream& is)
|
||||
}
|
||||
e.status = n.status;
|
||||
sanitizeJsonStrings(e.status);
|
||||
// Recipient-relative sat_id from the peer. Pass through as-is after
|
||||
// bounded sanitisation: empty = "on the peer itself", non-empty =
|
||||
// "on a satellite attached to the peer".
|
||||
e.sat_id = sanitizeIdent(n.sat_id, 64);
|
||||
sanitized.push_back(std::move(e));
|
||||
}
|
||||
if (dropped > 0)
|
||||
|
||||
Reference in new issue
Block a user