mirror of
https://github.com/jmcorgan/fips.git
synced 2026-08-09 00:04:54 +00:00
Add six forwarding counters that partition transit-forwarded packets by their tree relationship to the chosen next hop: tree-up (peer is our ancestor), tree-down (peer is our descendant and the destination is within its subtree), tree-down-cross (peer is our descendant but the destination is outside its subtree), cross-link descend (lateral peer, destination within its subtree), cross-link ascend (lateral peer, destination outside its subtree), and direct-peer. The six classes sum to forwarded_packets, asserted by a unit test. Classification is computed from tree coordinates at the transit chokepoint, so the error-signal routing callers are excluded. The two "outside the chosen peer's subtree" classes are both up-and-over forwards but differ in what they depend on. Tree-down-cross is the dive-to-tree-child cut-through: we forward down to our own child for a destination not beneath it, which is only possible because the child advertised cross-link reach upward to us, beyond its own subtree. Its count measures how much forwarding depends on that upward advertisement, i.e. what would change if cross-link advertisements were narrowed to subtree-entry only. Cross-link ascend, by contrast, uses the node's own lateral cross-link learned from a peer's split-horizon advertisement, so it does not depend on any upward advertisement. Surface the counters through the forwarding stats snapshot (control socket, show_routing and show_status) and reorganize the fipstop routing tab so its two columns separate own/endpoint traffic (received, delivered, originated) from forwarded/transit traffic (the route-class breakdown and drop reasons), with the tree-down-cross line visually flagged.
62 lines
1.7 KiB
JSON
62 lines
1.7 KiB
JSON
{
|
|
"data": {
|
|
"connection_count": 0,
|
|
"control_socket": "<redacted>",
|
|
"effective_ipv6_mtu": 1203,
|
|
"estimated_mesh_size": null,
|
|
"exe_path": "<redacted>",
|
|
"forwarding": {
|
|
"decode_error_bytes": 0,
|
|
"decode_error_packets": 0,
|
|
"delivered_bytes": 0,
|
|
"delivered_packets": 0,
|
|
"drop_mtu_exceeded_bytes": 0,
|
|
"drop_mtu_exceeded_packets": 0,
|
|
"drop_no_route_bytes": 0,
|
|
"drop_no_route_packets": 0,
|
|
"drop_send_error_bytes": 0,
|
|
"drop_send_error_packets": 0,
|
|
"forwarded_bytes": 0,
|
|
"forwarded_packets": 0,
|
|
"originated_bytes": 0,
|
|
"originated_packets": 0,
|
|
"received_bytes": 0,
|
|
"received_packets": 0,
|
|
"route_crosslink_ascend": 0,
|
|
"route_crosslink_descend": 0,
|
|
"route_direct_peer": 0,
|
|
"route_tree_down": 0,
|
|
"route_tree_down_cross": 0,
|
|
"route_tree_up": 0,
|
|
"ttl_exhausted_bytes": 0,
|
|
"ttl_exhausted_packets": 0
|
|
},
|
|
"ipv6_addr": "fd1b:4788:b7ab:7a43:6a61:1fc5:9fb1:e34c",
|
|
"is_leaf_only": false,
|
|
"is_root": true,
|
|
"link_count": 0,
|
|
"node_addr": "1b4788b7ab7a436a611fc59fb1e34c6e",
|
|
"npub": "npub1sx42mj99aql52aklsg70y2jmr95u7uz2p40k769aw46ppjv302kqkhmu5r",
|
|
"peer_count": 0,
|
|
"persistent": false,
|
|
"pid": "<redacted>",
|
|
"root": "1b4788b7ab7a436a611fc59fb1e34c6e",
|
|
"session_count": 0,
|
|
"sparklines": {
|
|
"bytes_in": [],
|
|
"bytes_out": [],
|
|
"loss_rate": [],
|
|
"mesh_size": [],
|
|
"peer_count": [],
|
|
"tree_depth": []
|
|
},
|
|
"state": "created",
|
|
"transport_count": 0,
|
|
"transport_peer_counts": {},
|
|
"tun_name": "<redacted>",
|
|
"tun_state": "disabled",
|
|
"uptime_secs": "<redacted>",
|
|
"version": "<redacted>"
|
|
},
|
|
"status": "ok"
|
|
} |