Skip to content

virtio-linux: enable conntrack marks for the guest classifier table - #803

Merged
norrietaylor merged 1 commit into
mainfrom
fix/virtio-linux-conntrack-mark
Oct 4, 2026
Merged

norrietaylor merged 1 commit into
mainfrom
fix/virtio-linux-conntrack-mark

Conversation

@norrietaylor

@norrietaylor norrietaylor commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

The guest minimald's classifier table (inet minimal_class) tags each new flow with its box's verdict and reads it back: ct mark set ct mark and 0xcfffffff or 0x10000000. That is ct mark, which needs CONFIG_NF_CONNTRACK_MARK. defconfig leaves it off. Without it, nft_ct answers EOPNOTSUPP, so nft -c rejects the whole table with "Could not process rule: Not supported", and the guest never loads the table.

Evidence:

  • The current guest kernel (pin c5839783, after virtio-linux, microvm-rootfs: add nftables socket support and nft to the guest #798) has # CONFIG_NF_CONNTRACK_MARK is not set in its embedded IKCONFIG. NFT_CT, NFT_SOCKET, NFT_NAT, NFT_REJECT_INET, NFT_LOG and NFT_LIMIT are all =y.
  • The guest rejects the rendered table at line 21, columns 81-87 (the ct mark load).
  • The same rendered bytes pass nft -c -f - on a stock Ubuntu 6.17 kernel, which has CONFIG_NF_CONNTRACK_MARK=y.

This adds want NF_CONNTRACK_MARK beside the NFT_SOCKET group from #798, so the existing assert catches a drop. It unblocks gominimal/minimal#1886 (the guest classifier test guest_classifier_table_present) once minimal's pin moves to this commit.

Summary by CodeRabbit

  • Bug Fixes
    • Linux builds now include kernel support for nftables connection-mark rules. Builds will report an error if this required support is not enabled, rather than completing without it.

@norrietaylor
norrietaylor requested a review from a team as a code owner October 4, 2026 04:15
@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

🧰 Additional context used
📚 Code guidelines (1)
AGENTS.md — auto-discovered

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: gominimal/pkgs/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 6db028ff-2ade-4eba-a130-68a19f43a845
📥 Commits

Reviewing files that changed from the base of the PR and between c583978 and 2a5a518.

📒 Files selected for processing (1)
  • packages/virtio-linux/build.sh

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.


📝 Walkthrough

Walkthrough

The kernel build script adds NF_CONNTRACK_MARK to its required options. The existing check reports an error if olddefconfig does not retain the option as enabled.

Changes

Kernel configuration

Layer / File(s) Summary
Require conntrack mark support
packages/virtio-linux/build.sh
The required kernel options now include NF_CONNTRACK_MARK, used by nftables connection-mark rules. The existing check reports the option as missing if it is not enabled.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Suggested reviewers: twitchyliquid64

Merge Risk: ⚪ Minimal · up to 2a5a5

The required kernel option can be enabled under the declared configuration; no merge-blocking risk was identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: enabling conntrack marks for the guest classifier table.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@norrietaylor
norrietaylor added this pull request to the merge queue Oct 4, 2026
Merged via the queue into main with commit 02cd1ee Oct 4, 2026
11 checks passed
@norrietaylor
norrietaylor deleted the fix/virtio-linux-conntrack-mark branch October 4, 2026 18:52
yermakoffivan pushed a commit to yermakoffivan/minimal that referenced this pull request Oct 5, 2026
…minimal#1962)

* build: bump the pkgs locked_commit for the guest kernel's conntrack marks

Picks up gominimal/pkgs#803, which enables CONFIG_NF_CONNTRACK_MARK in the
virtio-linux guest kernel. The guest classifier table's ct mark rule needs it
(T75, gominimal#1886). One pkgs commit; the only file it changes is
packages/virtio-linux/build.sh.

* build: bump the pkgs locked_commit for the timezone database in base

gominimal/pkgs#804 adds tzdata to base, so boxes resolve TZ=Area/City

and Python's zoneinfo finds its zones.
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.

2 participants