fix(nft): command compatibility hotfix — 3 broken patterns (v1.87.2)#427
Merged
fix(nft): command compatibility hotfix — 3 broken patterns (v1.87.2)#427
Conversation
…87.2) Three nft command patterns broken on fleet nftables v1.0.2-v1.1.1: - `nft list counters <family> <table>` — BROKEN - `nft list chains <family> <table>` — BROKEN - `nft list sets <family> <table>` — BROKEN The rule: `list <plural> <family> <table>` = broken. The fix: use global or singular forms, filter in code. Go fixes: - rule_counters.go: single `nft -j list counters` (global), filter by family+table in parseNamedCountersJSONFiltered(). Single nft call for both families. Prometheus path also fixed. - evidence_chains.go: `nft list table <family> nftban` instead of broken `nft list chains <family> nftban`. Shell fixes: - cmd_stats.sh: `nft -j list counters` + jq filter for drop/exceeded counters only (not all counters — that was summing accepts too). - cmd_firewall.sh: `nft list table $table` instead of broken `nft list sets/chains $table`. Single dump, extract both. - nft_crosscheck.sh: `nft list table` for set iteration. 2 new tests: parseNamedCountersJSONFiltered with mixed families + foreign table exclusion. Verified: counters now show real enforcement data on both AlmaLinux and Ubuntu. 27/27 CLI runtime pass on both distros. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
9839720 to
c130263
Compare
itcmsgr
added a commit
that referenced
this pull request
Apr 15, 2026
3 broken nft command patterns fixed across 8 locations. Counter evidence now working on all fleet hosts. PR: #427. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
itcmsgr
added a commit
that referenced
this pull request
Apr 16, 2026
3 broken nft command patterns fixed across 8 locations. Counter evidence now working on all fleet hosts. PR: #427. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
3 broken nft command patterns fixed across 8 locations (Go + shell).
Rule:
list <plural> <family> <table>= broken on v1.0.x-v1.1.x.Fix: global or singular forms, filter in code.
Verified: counters working, 27/27 CLI pass, both AlmaLinux + Ubuntu.
🤖 Generated with Claude Code