feat(trunk): apply per-link TG filter to peer node roster on ingest
BLACKLIST_TGS / ALLOW_TGS previously gated only audio and active-talker traffic on a trunk link; the full client roster (MsgPeerNodeList) was stored verbatim, so a peer node parked on a filtered TG still appeared in /status.trunks[<section>].nodes and the MQTT/Redis mirrors. Filter each node-list entry in TrunkLink::handleMsgPeerNodeList using the same composite gate as the audio receive path (isBlacklisted(tg) || isBlacklisted(mapTgIn(tg)) || !isAllowed(tg)), so TG_MAP translation is honoured. Filtered entries are dropped entirely. Safe because m_partner_nodes feeds only statusJson() and onPeerNodeList() (MQTT/Redis) -- no routing depends on it. Adds test_21b_filter_drops_nodes_from_roster and documents the receive-side trim in PEER_PROTOCOL.md and svxreflector.conf.in.
This commit is contained in:
1 parent
e3b0b6f3df
commit
7cf6589a3b
4 files changed
+66
-1
No files matched your search
@@ -2044,6 +2044,16 @@ void TrunkLink::handleMsgPeerNodeList(std::istream& is)
|
||||
continue;
|
||||
}
|
||||
e.tg = n.tg;
|
||||
|
||||
// Per-link TG filter: a node whose selected TG is blacklisted or falls
|
||||
// outside ALLOW_TGS on this link is dropped from the roster entirely,
|
||||
// mirroring the audio/talker receive gate (handleMsgPeerTalkerStart).
|
||||
// This keeps filtered TGs out of /status, MQTT and the Redis mirror —
|
||||
// m_partner_nodes feeds statusJson() and onPeerNodeList() only.
|
||||
if (isBlacklisted(e.tg) || isBlacklisted(mapTgIn(e.tg)) || !isAllowed(e.tg))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
e.qth_name = sanitizeText(n.qth_name, 64);
|
||||
|
||||
// Lat/lon: reject non-finite; drop out-of-range values by zeroing
|
||||
|
||||
Reference in new issue
Block a user