Skip to content

Reuse runtime firewall detection in isolated VM gates - #19

Merged
chen21019 merged 1 commit into
mainfrom
fix/vm-firewall-mode-preflight-20260913
Sep 13, 2026
Merged

chen21019 merged 1 commit into
mainfrom
fix/vm-firewall-mode-preflight-20260913

Conversation

@chen21019

@chen21019 chen21019 commented Sep 13, 2026

Copy link
Copy Markdown

Scope

  • Host NAT and host-port opt-in VM tests use the runtime's read-only Docker firewall detection instead of requiring the newer FirewallBackend.Driver field.
  • Remove the opposite-frontend probe that could load legacy modules on an nft-only host. Production firewall paths are unchanged.
  • Document the isolated VM safety boundary in README.

Verification

  • Targeted offline Go tests passed: internal/firewall, hostnat, hostports; git diff --check passed.
  • Ubuntu 26.04.1 / Docker 29.8.0 isolated 10 GiB VMware VM, zero pre-existing containers:
    • Native nftables: both opt-in VM tests safely rejected the wrong backend; legacy kernel modules remained unloaded.
    • Clean Docker iptables-nft mode: TestIptablesNFTBatchOnVM and TestIptablesNFTOnDisposableVM passed; Docker NAT chain remained; no native Docker table or legacy modules were present.
    • Clean Docker iptables-legacy mode, explicitly selected only for this isolated test: TestIptablesLegacyBatchOnVM and TestIptablesLegacyOnDisposableVM passed; Docker legacy NAT chain remained; no native Docker table was present.
  • GitHub test-build-scan, integrity, and CodeQL checks passed.
  • VM restored to its pre-test native nftables snapshot; zero containers and legacy modules, original two snapshots retained; temporary snapshot removed.
  • Test-only PR: no new runtime image is published or required.

@chen21019
chen21019 requested a review from a team as a code owner September 13, 2026 02:56
@chen21019
chen21019 merged commit 05f13d6 into main Sep 13, 2026
5 checks passed
@chen21019
chen21019 deleted the fix/vm-firewall-mode-preflight-20260913 branch September 13, 2026 03:12
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