satellite: honor SATELLITE_FILTER on parent and satellite legs

Adds optional SATELLITE_FILTER in [GLOBAL] on the satellite side using
TgFilter grammar (exact, "24*" prefix, "2427-2438" range, comma-separated).

Flow:
  - SatelliteClient parses SATELLITE_FILTER at init and applies it to its
    own outbound (onLocalTalkerStart/Stop/Audio/Flush): events for TGs
    outside the filter are not forwarded to the parent.
  - After authenticating, the satellite sends the filter to the parent via
    MsgTrunkFilter (type 122, already defined in ReflectorMsg.h and
    reserved for this use).
  - SatelliteLink (parent side) dispatches MsgTrunkFilter and stores a
    TgFilter. Every parent->satellite send is gated by filterPassesTg();
    empty filter = pass-all (pre-existing behavior).

Backwards compatible: older satellites never send the message; older
parents silently ignore unknown message types. The patched parent keeps
forwarding all TGs until it receives a MsgTrunkFilter.

Fixes the bug where a satellite could not restrict the TGs it received
from its parent — prior to this change SatelliteLink explicitly relayed
ALL TGs bidirectionally regardless of any local filter.
This commit is contained in:
Jens DJ1JAY authored and Audric committed 2026-04-20 14:05:32 +02:00
1 parent ba5d03e491
commit 719aa3e37c
5 files changed
+91 -1

No files matched your search

@@ -175,6 +175,11 @@ CERT_CA_HOOK=@SVX_SHARE_INSTALL_DIR@/ca-hook.py
#SATELLITE_PORT=5303
#SATELLITE_SECRET=change_this_satellite_secret
#SATELLITE_ID=my-satellite
# Optional TG filter — restrict which TGs to receive from parent.
# Uses standard filter syntax: exact "26200", prefix "24*", range "2427-2438",
# comma-separated. Empty or absent = receive all TGs.
# Sent to the parent via MsgTrunkFilter (type 122) after authentication.
#SATELLITE_FILTER=24*,262*
#
# MQTT publishing. Optional — omit this section to disable.