mirror of
https://github.com/jmcorgan/fips.git
synced 2026-08-03 05:16:15 +00:00
The msg1 rate limiter ran one bucket for everything, so a rekey or restart msg1 from an established peer competed for admission with strangers. Under inbound pressure the maintenance traffic lost, and an established session could not re-handshake until the stranger flood eased. Classify the source before the rate-limit decision and give established links their own bucket. Classification costs two map lookups and no crypto, so it runs first. The predicate cannot be the one the master line uses. There, IK has learned the peer identity by the time msg1 is handled, so a hit in the address-to-link map is enough to prove an established peer. Under XX no identity is known at msg1, and an in-flight handshake populates that map before the peer is promoted, so the same predicate would let a stranger draw on the established bucket for the whole life of its handshake. This version requires a promoted peer, which is the property actually being asserted. Two tests cover the difference and both fail if the predicate is replaced with the master-line one: a pending inbound stranger must keep drawing on the stranger bucket for its whole lifetime, and the established gate must not admit on a bare map hit. The four handshake reject arms that leak a session index are untouched; every hunk here sits at or above the end of the msg1 handler.
Reference
Information-oriented technical descriptions for lookup on demand. Reference content describes what is: wire formats, configuration keys, command-line flags, control-socket commands, default values, file paths, exit codes. It is consulted, not read end-to-end.
Reference is austere by design: minimal narrative, no opinions, no guidance on when to use a feature. The "why" lives in design/; the "how do I accomplish X" lives in how-to/.
Available Reference
| Document | Scope |
|---|---|
| wire-formats.md | All FMP and FSP message byte layouts, encapsulation walkthrough |
| configuration.md | Full YAML configuration reference for the daemon and gateway |
| security.md | nftables baseline, peer ACL, cryptographic primitives, rekey defaults, threat-resistance matrix |
| nostr-events.md | Kind 37195 advert, Kind 21059 traversal signaling, Kind 10050 inbox relays |
| transports.md | Per-transport statistics counter inventory |
| control-socket.md | Line-delimited JSON control protocol for the daemon and gateway |
| cli-fips.md | fips daemon CLI: options, exit codes, environment, files |
| cli-fipsctl.md | fipsctl control-client: subcommands, options, exit codes |
| cli-fipstop.md | fipstop live-status TUI: tabs, keybindings |
| cli-fips-gateway.md | fips-gateway service CLI: options, exit codes, files |