Skip to content

diag: report the guest firewall's drops in status - #221

Merged
linyiru merged 1 commit into
mainfrom
diag-firewall-drops
Nov 8, 2026
Merged

linyiru merged 1 commit into
mainfrom
diag-firewall-drops

Conversation

@linyiru

@linyiru linyiru commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

When a job goes over its connection limit (#208), or sends to a non-public address (#218), it only sees connect timeouts. Nothing tells it that the firewall dropped those connections.

firerunner status now reads the firewall's named drop counters. It reads them from the main table and from the <table>_conns limit table, and reports them by reason:

  • In --json: network.drops with spoof, nonpublic, conn_limit and conn_rate.
  • In text: a guest drops line.

The counters need root to read. When they cannot be read, network.drops_error says why. If the limit table does not exist, for example because the limits are off, it adds nothing.

Tests: TestFirewallDrops covers both tables, a missing limit table, and a run without root. I checked the nft -j list counters table ip <table> syntax, its JSON, and the error for a missing table against nft 1.1.7 in a throwaway network namespace.

A job over its connection limit or rate, or sending to a non-public
address, sees only connect timeouts, with nothing saying the firewall
dropped it. status now reads the firewall's named drop counters, from
the main table and the <table>_conns limit table, and reports them by
reason (spoof, nonpublic, conn_limit, conn_rate) as network.drops in
--json and a "guest drops" line in text. When they cannot be read
(they need root) network.drops_error says why; a limit table that does
not exist adds nothing.

Signed-off-by: Yi-Ru Lin <deduce@gmail.com>
@linyiru
linyiru enabled auto-merge November 8, 2026 05:42
@linyiru
linyiru merged commit 716a534 into main Nov 8, 2026
7 checks passed
@linyiru
linyiru deleted the diag-firewall-drops branch November 8, 2026 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant