The PDF is built from docs/topology_pdf/ (HTML + Graphviz), not from
TOPOLOGY_EXAMPLES.md, so the two prose copies had drifted. Resync them
and correct several claims that no longer matched the code.
- Add a LOCAL_ALIASES overlay section (+ diagram 6): re-home a short local
TG under an owned prefix so the mesh routes the long number while local
clients keep dialing the short one. Translation happens at the trunk
boundary only -- clients and satellites see the short number.
- Peer interest: MsgPeerTgInterest (type 129) lets a passive listener
register interest without keying. The HTML still claimed the owner
cannot fan a TG back until the peer transmits; corrected in the
Background, the section-2 return leg, and the Properties list.
- Satellite trust model: per-satellite SECRET_<id> is implemented
(Reflector::resolveSatelliteSecret); drop the "future work" note.
- SATELLITE_FILTER: filter entries are exact unless suffixed with "*"
(TgFilter::parse), so the documented bare 2222/2224 values matched only
those literal TGs. Use 2222* and document the syntax.
- Zones are no longer drawn as satellites. A satellite owns no prefix and
inherits its parent's identity, so a prefix-owning Zone cannot be one.
Zones now hang off IT 222 as sub-trunks (REMOTE_PREFIX supports a
comma-separated list), shown with a mix of owned, local-only and aliased
TGs. Note that ROUTABLE_PREFIXES=* forwards unowned TGs to the uplink,
where the peer drops them.
- Merge the old section 3 into section 2 as a "sub-trunk star" variant --
it was the same two-domain topology with a star instead of a full mesh.
Satellite becomes section 3, twin section 4.
- Disable code-font ligatures: JetBrains Mono rendered SECRET_<id>= as
SECRET_<id>= with the ">" swallowed by a ">=" ligature.
The gateway example (section 2) only traced the foreign->Zone direction,
which works via gateway prefix routing because the gateway holds the direct
trunk. The reverse — a regional Zone client calling an international TG —
does NOT work by default: the Zone's prefix table has only 222 + Zone
prefixes, so a foreign TG matches nothing and stays local. Without
ROUTABLE_PREFIXES a regional reflector can never call an international TG.
Add a subsection to section 2 (in both TOPOLOGY_EXAMPLES.md and the PDF
source topology.html) showing the Zone uplink config
(ROUTABLE_PREFIXES=262,240 alongside REMOTE_PREFIX=222), the explicit-prefix
rule for a multi-trunk Zone vs the '*' default route for a single-uplink
leaf, and the multi-trunk '*' warning. Cross-links to README section 5 and
CONCEPTS.md. Rebuilt TOPOLOGY_EXAMPLES.pdf.
A reflector does not impose the prefix convention on its nodes. Make explicit
the third routing case (previously undocumented): a TG matching no prefix in
the mesh has no owner and stays local-only (relayed among the reflector's own
nodes, never trunked), exactly like stock SvxReflector.
Routing is decided solely by longest-prefix-match on the number itself,
regardless of length: a conforming number is routable wherever its prefix
points *if that prefix is owned by a reflector in the mesh* (e.g. 22210->222
Italy, 26201->262 Germany); a non-matching number (e.g. short 1-199 in a
typical MCC scheme) stays local and is unreachable by international traffic.
Conversely a 'local' number that happens to match a configured prefix will be
routed to that owner.
Use real in-repo MCC examples (222/262) instead of unassigned 201/401, and
state the 'if owned in the mesh' precondition. Updated README (How TG
ownership works), CONCEPTS.md (section 2), and TOPOLOGY_EXAMPLES.md; rebuilt
TOPOLOGY_EXAMPLES.pdf from the matching topology.html change.
- §1 (01_intl_mesh.dot): full mesh now includes ES (214), SE (240),
DE (262), IT (222), UA (255) — 5-node pentagon with 10 edges.
- §2 (02_flat_mesh.dot): international side likewise widened to the
5-country full mesh; IT 222 stays as the rightmost gateway vertex.
National-side Zones spread into a 2x2 block mirroring the
international layout so the 10 national edges have room to breathe.
- ASCII art in TOPOLOGY_EXAMPLES.md §1 and §2 updated to match.
- TOPOLOGY_EXAMPLES.pdf rebuilt via docs/build_topology_pdf.sh.
A non-owner reflector with two trunk legs (a country gateway sitting
between an international mesh and a national mesh) now forwards inbound
trunk traffic toward the actual prefix owner — automatically, via
longest-prefix-match in its own [TRUNK_x] table. Cluster TGs keep their
deliberate single-hop semantic to prevent loops in cyclic meshes.
Implementation
- Reflector::shouldRelayInbound(tg) composes the inbound relay decision:
* isLocalTG -> fan out (existing owner-relay)
* isClusterTG -> stop (anti-loop; cluster TGs broadcast outbound
from local clients only)
* hasPrefixRoute -> gateway forwarding via per-trunk isSharedTG
- The four isLocalTG gates in TrunkLink::handleMsgPeer{TalkerStart,
TalkerStop,Audio,Flush} are replaced by shouldRelayInbound. Source
exclusion in forwardTrunk*ToOtherTrunks plus per-link interest
tracking keep the topology naturally loop-free.
Tests
- topology.py: per-reflector `peers` filter for sparse layouts; new
reflector `d` (prefix 1219, trunked only to `b`) demonstrating
gateway-only reachability from `a` to `d`.
- generate_configs.py: honours the peers filter.
- test_trunk.py:
* setUpClass and test_01 skip non-existent pairs in sparse layouts.
* test_37_gateway_prefix_routing: a-client (122) <-> d-client (1219)
over TG 121950 in both directions, no CLUSTER_TGS.
* test_38_cluster_tg_local_client_broadcast: explicit coverage for
the outbound local-client cluster broadcast path.
- All previously passing tests still pass: 41/41 trunk + 7/7
mqtt-deltas + 14/14 twin.
Docs
- docs/TOPOLOGY_EXAMPLES.md (new) + .pdf + topology_pdf/ build sources +
build_topology_pdf.sh: visual cookbook of the five topology shapes
(international full-mesh, national mesh joined at gateway, satellite
tree, hybrid satellite-under-regional, HA twin pair). Includes an
MCC-range appendix with the recommendation to draw cluster TGs from
100-199 / 800-999 to avoid country-prefix collisions.
- docs/PEER_PROTOCOL.md: rewrote the "Owner-Relay Fanout" section as
"Inbound Relay (shouldRelayInbound)" with the three-regime
composition and clarified the single-mesh fanout caveat.
- README.md: feature bullet now describes gateway prefix routing and
links to TOPOLOGY_EXAMPLES.md (also added to the documentation list).