Files
Arjen 93ab8e4f62 fix(peer): a send that finds the active link gone moves traffic at once
A send on the active path that fails because the path is gone marks it
Suspect, and the next fast tick moves traffic to a live standby. Only
the kernel's unreachable errors (ENETUNREACH, EHOSTUNREACH) counted as
that. A connection-oriented transport has no route errors: when its
link drops it reports NotConnected (TCP, Tor, Nym) or, on BLE, an
untyped SendFailed("not connected"). Neither moved the path, so a dead
BLE or TCP path kept carrying a peer's traffic until the discretionary
switch. Seen on a phone moved from one USB cable to another while also
linked over BLE: every send failed "not connected" for 66 s, with a live
2 ms path beside it, before a discretionary switch took it.

`TransportError::is_unreachable` now also matches NotConnected, and BLE
returns the typed NotConnected for a send with no connection behind it.
Only a Live path is marked, so a path still connecting is untouched; the
background redial `send_nowait` already starts on NotConnected still
runs, and the path's own probes bring it back once it answers. With no
standby, Suspect changes nothing and the peer is not removed. BLE's
typed error also lets a msg1 reply take the same arrival-address
fallback TCP already takes in `handshake.rs`.

`a_send_that_finds_the_active_link_gone_moves_traffic_to_the_live_standby`
fails a dual-homed pair's cable sends with NotConnected (a test-only
switch on the loopback transport) and checks the cable goes Suspect and
traffic moves to the wifi on the next tick; it fails without the change.
2026-10-23 14:34:34 -03:00
..
2026-08-30 10:42:59 +00:00

FIPS Design

Architectural and protocol-level explanations for FIPS — the why and the how behind the wire and the system. For wire formats and configuration keys, see reference/. For task recipes, see how-to/. For end-to-end lessons, see tutorials/.

Reading Order

Start with fips-concepts.md for the novice-friendly framing of what FIPS is and why, then move to fips-architecture.md for the protocol stack, identity model, and two-layer encryption walkthrough. From there, follow the protocol stack from bottom to top. After the stack, fips-mesh-operation.md explains how the pieces work together at runtime. Cross-cutting and supporting documents cover specific subsystems in detail.

Foundations

Document Description
fips-concepts.md What FIPS is, why it exists, mental model
fips-architecture.md Protocol stack, identity, two-layer encryption
fips-prior-work.md Designs and protocols FIPS builds on

Protocol Stack

Document Description
fips-transport-layer.md Transport layer: datagram delivery over arbitrary media
fips-mesh-layer.md FIPS Mesh Protocol (FMP): peer authentication, link encryption, forwarding
fips-session-layer.md FIPS Session Protocol (FSP): end-to-end encryption, sessions
fips-ipv6-adapter.md IPv6 adaptation: TUN interface, DNS, MTU enforcement
fips-native-api.md Native datagram API: pubkey-addressed flows over FSP, and what it is instead of the TUN path

Cross-Cutting

Document Description
fips-mmp.md Metrics Measurement Protocol (link + session)
fips-mtu.md Path MTU model, encapsulation overhead, PMTUD
fips-multi-path-switchover.md One peer, several paths: probe/ack, per-path heartbeats, measured selection, switchover without a second handshake
fips-security.md fips0 interface threat model and default-deny baseline

Mesh Behavior

Document Description
fips-mesh-operation.md How the mesh operates: routing, discovery, error recovery
fips-nostr-discovery.md Optional Nostr-mediated peer discovery and UDP NAT hole-punch
port-advertisement-and-nat-traversal.md Nostr-signaled port advertisement and UDP NAT-traversal protocol; generic, with FIPS as an example implementation

Deeper Dives

Document Description
fips-spanning-tree.md Spanning tree algorithms: root discovery, parent selection, coordinates
fips-bloom-filters.md Bloom filter properties: FPR analysis, size classes, split-horizon
spanning-tree-dynamics.md Spanning tree walkthroughs: convergence scenarios, worked examples

Adjacent Components

Document Description
fips-gateway.md fips-gateway service: outbound (LAN-to-mesh) DNS-proxy + virtual-IP NAT and inbound (mesh-to-LAN) port-forwarding, sharing one nftables table