guard/tests
loki5512344 9baae25acb
feat(xdp): estimate distinct sources in prefix stats, fix the detection window
The subnet detector's spoof gate needs the number of distinct sources in a
prefix, but the XDP path reported 0, so a /24 flooded from a botnet could never
reach the Block verdict and the whole subnet detector was inert with XDP on.

- prefix_stats carries a 64-bit bitmap of hashed source addresses (interface
  ID for IPv6, address for IPv4); userspace counts the set bits.
- read_prefix_stats now resets each entry after reading: the counters are
  documented as per-window and compared against fixed thresholds, but were
  cumulative, so with enough traffic every active prefix eventually looked
  like an attack.
- The monitor no longer suppresses Block on the XDP path and no longer carries
  the now-dead "no source diversity" branch.

ABI: the prefix_stats value grows 24 -> 32 bytes; the xdp_object_maps test
pins the new size.
2026-11-16 12:36:19 +01:00
..
app_shutdown.rs fix(core): close auth bypass, hangs and memory leaks found by review 2026-11-16 12:06:23 +01:00
clickhouse_writer.rs fix(core): close auth bypass, hangs and memory leaks found by review 2026-11-16 12:06:23 +01:00
config_parse.rs fix(core): close auth bypass, hangs and memory leaks found by review 2026-11-16 12:06:23 +01:00
connection_limits.rs fix(core): close auth bypass, hangs and memory leaks found by review 2026-11-16 12:06:23 +01:00
filter_logic.rs fix(core): close auth bypass, hangs and memory leaks found by review 2026-11-16 12:06:23 +01:00
http_protocol.rs feat(xdp): IPv6 UDP rate limit, working loader; English comments and docs 2026-11-15 23:50:52 +01:00
manager_security.rs fix(core): close auth bypass, hangs and memory leaks found by review 2026-11-16 12:06:23 +01:00
pow_difficulty.rs fix(core): close auth bypass, hangs and memory leaks found by review 2026-11-16 12:06:23 +01:00
pow_roundtrip.rs fix(core): close auth bypass, hangs and memory leaks found by review 2026-11-16 12:06:23 +01:00
protocol_registry.rs feat(xdp): IPv6 UDP rate limit, working loader; English comments and docs 2026-11-15 23:50:52 +01:00
redis_backoff.rs fix(core): close auth bypass, hangs and memory leaks found by review 2026-11-16 12:06:23 +01:00
subnet_detection.rs feat(xdp): estimate distinct sources in prefix stats, fix the detection window 2026-11-16 12:36:19 +01:00
traffic_intel.rs fix(core): close auth bypass, hangs and memory leaks found by review 2026-11-16 12:06:23 +01:00
traffic_prefix_stats.rs feat(xdp): estimate distinct sources in prefix stats, fix the detection window 2026-11-16 12:36:19 +01:00
tui_metrics.rs feat(xdp): IPv6 UDP rate limit, working loader; English comments and docs 2026-11-15 23:50:52 +01:00
xdp_attach_smoke.rs fix(xdp): correct payload length, attach/detach, whitelist and ban upkeep 2026-11-16 12:06:05 +01:00
xdp_ban_clock.rs feat(xdp): IPv6 UDP rate limit, working loader; English comments and docs 2026-11-15 23:50:52 +01:00
xdp_ban_keys.rs fix(xdp): correct payload length, attach/detach, whitelist and ban upkeep 2026-11-16 12:06:05 +01:00
xdp_ban_v6.rs feat(xdp): IPv6 UDP rate limit, working loader; English comments and docs 2026-11-15 23:50:52 +01:00
xdp_diagnostics.rs style: switch rustfmt to hard tabs; document tests-separate rule in TODO 2026-11-15 22:34:29 +01:00
xdp_events.rs feat(xdp): IPv6 UDP rate limit, working loader; English comments and docs 2026-11-15 23:50:52 +01:00
xdp_globals.rs style: switch rustfmt to hard tabs; document tests-separate rule in TODO 2026-11-15 22:34:29 +01:00
xdp_loader.rs fix(xdp): correct payload length, attach/detach, whitelist and ban upkeep 2026-11-16 12:06:05 +01:00
xdp_object_maps.rs feat(xdp): estimate distinct sources in prefix stats, fix the detection window 2026-11-16 12:36:19 +01:00
xdp_services.rs fix(xdp): correct payload length, attach/detach, whitelist and ban upkeep 2026-11-16 12:06:05 +01:00
xdp_whitelist_keys.rs fix(xdp): correct payload length, attach/detach, whitelist and ban upkeep 2026-11-16 12:06:05 +01:00