feat(relay): log malformed datagram counts
PLAN.md calls for heavy diagnostics and better malformed-frame handling. The relay already disconnected peers after repeated malformed datagrams, but overlay or header-level malformed datagrams had no operator-facing count until the peer was closed. Log each malformed peer datagram with room, peer id, role, current count, threshold, and whether the threshold is disconnecting the peer. Keep the existing threshold behavior unchanged; this only makes the counter visible. Document the malformed-datagram count in the relay README section. Test Plan: - cargo fmt --check - cargo test -p lanparty-relay - cargo test --workspace - cargo clippy --workspace --all-targets -- -D warnings - git diff --check Refs: PLAN.md
This commit is contained in:
@@ -129,6 +129,8 @@ certificate handling remains future work. Ethernet forwarding decisions are
|
||||
logged with room, peer, MAC, ethertype, action, drop reason, and target count.
|
||||
Safety-policy rejects use the `filtered` action so they are distinguishable
|
||||
from malformed/unknown-destination drops and rate limits.
|
||||
Malformed peer datagrams log their per-peer count before the relay disconnects
|
||||
peers that cross the malformed-datagram threshold.
|
||||
Unknown unicast from a client is forwarded only to the gateway port; unknown
|
||||
unicast from the gateway is dropped instead of flooded to every remote client.
|
||||
When a peer joins or leaves, the relay sends a reliable lifecycle control event
|
||||
|
||||
Reference in New Issue
Block a user