Require matching trunk section names and cap audio debug at 500 frames
Trunk link matching now requires the peer's hello ID (section name) to match the local [TRUNK_x] section name. Both sides of a trunk link must use the same section name, agreed upon by both sysops. This replaces the previous matching by secret+prefix only. BREAKING CHANGE: existing deployments must rename their [TRUNK_x] sections so both sides use the same name for each link. Also cap TRUNK_DEBUG audio frame logging at 500 frames per trunk link to prevent excessive log output during sustained transmissions.
This commit is contained in:
1 parent
638d3c527e
commit
05c4c88ff3
6 files changed
+59
-20
No files matched your search
+10
-2
@@ -98,5 +98,13 @@ def service_name(name: str) -> str:
|
||||
def mapped_satellite_port(name: str) -> int:
|
||||
return REFLECTORS[name]["trunk_port_base"] + 303
|
||||
|
||||
def trunk_section_name(peer_name: str) -> str:
|
||||
return f"TRUNK_{peer_name.upper()}"
|
||||
def trunk_section_name(name_a: str, name_b: str = "") -> str:
|
||||
"""Shared trunk section name for a link between two reflectors.
|
||||
|
||||
Both sides must use the same section name. Convention: sorted pair.
|
||||
If only one name given (legacy), returns TRUNK_<NAME> for test harness use.
|
||||
"""
|
||||
if not name_b:
|
||||
return f"TRUNK_{name_a.upper()}"
|
||||
pair = tuple(sorted([name_a, name_b]))
|
||||
return f"TRUNK_{pair[0].upper()}_{pair[1].upper()}"
|
||||
Reference in new issue
Block a user