perf(deception): sample per-packet reply-send drop log (log-flood hygiene) #260
No reviewers
Labels
No labels
bug
deploy
documentation
duplicate
enhancement
good first issue
help wanted
invalid
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
femboy/blackwall!260
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/deception-drop-log-throttle"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
drop_and_logdid an unconditionaleprintln!per dropped reply. Under aspoofed-source SYN/UDP flood every syn-cookie reply to an unroutable source
fails identically (
ENETUNREACH), so the flood produces one log line perpacket: a 10-second lab flood emitted 133,121 lines. In a real deployment
under a real flood that is a log-flood DoS - millions of identical lines/sec
drowning the journal and burning I/O on the box that is already under attack.
Change
Sample the log: print the first failure and every 1024th thereafter, carrying
the running total so a burst stays visible. ~133k lines -> ~130. Same
Verdict::Dropbehaviour; only log volume changes.should_sample_drop_logextracted as a pure, unit-tested helper.
Not a fix for the syncookie lab flake
An earlier revision of this PR claimed it addressed the
deception-syncookiethroughput flake. A lab run disproved that: with the log throttled to ~130
lines the generator still only reached 36344 pps (vs 30-35k unthrottled) -
within noise, still below the 50%-of-77k fidelity floor. That flake is host
CPU contention (the victim NFQUEUE engine competing with the co-located
generator on a shared runner) and is tracked separately. This PR is log
hygiene only.
Verification
clippy/fmt/unit tests green forblackwall-deception. The lab job is redon the unrelated
deception-syncookiethroughput gate, not on this change.perf(deception): sample per-packet reply-send drop log (syncookie throughput flake)to perf(deception): sample per-packet reply-send drop log (log-flood hygiene)