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).
50 lines
1.9 KiB
Plaintext
50 lines
1.9 KiB
Plaintext
// Satellite tree — Italian Zones are satellites of IT 222.
|
|
// Only IT 222 is on the international trunk mesh.
|
|
digraph SatTree {
|
|
layout = dot;
|
|
rankdir = TB;
|
|
bgcolor = "transparent";
|
|
margin = 0.3;
|
|
splines = true;
|
|
ranksep = 0.9;
|
|
nodesep = 0.4;
|
|
|
|
node [shape=box, style="filled,rounded", fontname="Helvetica-Bold",
|
|
fontsize=13, penwidth=2, width=1.05, height=0.65, fixedsize=true];
|
|
|
|
// Foreign country gateways (top row)
|
|
subgraph cluster_intl {
|
|
label = "International trunk mesh (port :5302)";
|
|
fontname = "Helvetica-Bold"; fontsize = 12; color = "#1a4fa3";
|
|
style = "rounded,dashed"; bgcolor = "#f4f8ff";
|
|
SE [label="SE\n240", fillcolor="#dde8fb", color="#1a4fa3"];
|
|
DE [label="DE\n262", fillcolor="#dde8fb", color="#1a4fa3"];
|
|
IT [label="IT\n222", fillcolor="#fde2d4", color="#c0531c"];
|
|
}
|
|
|
|
// Satellite zones hanging off IT 222
|
|
subgraph cluster_sat {
|
|
label = "Italian satellite tree (port :5303)";
|
|
fontname = "Helvetica-Bold"; fontsize = 12; color = "#1e7d34";
|
|
style = "rounded,dashed"; bgcolor = "#f5fbf6";
|
|
Z1 [label="IT-Z1\n2221\nfilter=2221", fillcolor="#dff3e0", color="#1e7d34", height=0.85];
|
|
Z2 [label="IT-Z2\n2222\nfilter=2222", fillcolor="#dff3e0", color="#1e7d34", height=0.85];
|
|
Z3 [label="IT-Z3\n2223\nfilter=2223", fillcolor="#dff3e0", color="#1e7d34", height=0.85];
|
|
Z4 [label="IT-Z4\n2224\nfilter=2224", fillcolor="#dff3e0", color="#1e7d34", height=0.85];
|
|
Z5 [label="IT-Z5\n2225\nfilter=2225", fillcolor="#dff3e0", color="#1e7d34", height=0.85];
|
|
}
|
|
|
|
// Trunk edges (intl full mesh)
|
|
edge [color="#5f6368", penwidth=1.5, dir=none, constraint=false];
|
|
SE -> DE; SE -> IT; DE -> IT;
|
|
|
|
// Satellite mirror edges (IT 222 ↔ each zone)
|
|
edge [color="#c0531c", penwidth=1.6, style=dashed, dir=both,
|
|
arrowhead=normal, arrowtail=normal, arrowsize=0.6, constraint=true];
|
|
IT -> Z1;
|
|
IT -> Z2;
|
|
IT -> Z3;
|
|
IT -> Z4;
|
|
IT -> Z5;
|
|
}
|