Skip to content

docs: T9157: document firewall fib-type match - #2186

Open
ruben-herold wants to merge 4 commits into
vyos:rollingfrom
ruben-herold:T9157-fib-type-match
Open

docs: T9157: document firewall fib-type match#2186
ruben-herold wants to merge 4 commits into
vyos:rollingfrom
ruben-herold:T9157-fib-type-match

Conversation

@ruben-herold

Copy link
Copy Markdown
Contributor

Change Summary

Companion documentation for vyos/vyos-1x#5372, which adds fib-type
as a source/destination match option (nftables' fib daddr/saddr type
expression) for the forward/input/output/name rule sets, IPv4 and IPv6.
Adds a {cfgcmd} block per rule-set/side right after address-mask,
matching the existing style for these pages, plus a prerouting raw
usage example in the prose.

Related Task(s)

Related PR(s)

Backport

Checklist:

  • I have read the CONTRIBUTING document

Companion doc entry for vyos/vyos-1x#5372, which adds
"fib-type" as a source/destination match option
(nftables' fib daddr/saddr type expression) for
forward/input/output/name rule sets, ipv4 and ipv6.
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 3259de56-e6a5-4314-9e1d-0ace8f82d76a

📥 Commits

Reviewing files that changed from the base of the PR and between f96fb11 and 0a218a0.

📒 Files selected for processing (2)
  • docs/configuration/firewall/ipv4.md
  • docs/configuration/firewall/ipv6.md
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • ansible/ansible (manual)
🚧 Files skipped from review as they are similar to previous changes (2)
  • docs/configuration/firewall/ipv4.md
  • docs/configuration/firewall/ipv6.md
📜 Recent review details
⏰ Context from checks skipped due to timeout. (3)
  • GitHub Check: validate
  • GitHub Check: Mergify Merge Protections
  • GitHub Check: Summary
🧰 Additional context used
🔍 Remote MCP vyos.dev

Relevant review context

  • T9157 is Open, Normal priority, titled “Support fib daddr type / fib saddr type matching in firewall rules (especially prerouting raw)”. Its primary use case is distinguishing locally destined traffic (fib daddr type local) from forwarded traffic before applying notrack.
  • The task identifies local, unicast, broadcast, and anycast as relevant FIB types and requests both destination and source matching.
  • The documented two-rule pattern—accept local traffic, then notrack remaining traffic—matches the task’s requested syntax and motivation.
  • Testing guidance in the task comments says to test on rolling; backporting to 1.5 should be requested separately.
  • Do not document set firewall ipv4 forward filter disable-conntrack as a universally available alternative: a task comment explicitly states that it does not exist in VyOS 1.5.1.

📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Added IPv4 and IPv6 firewall FIB lookup and route-type matching documentation.
    • Covers source reverse-path and destination route lookups across standard, custom, and prerouting raw chains.
    • Documents supported route classifications, negated matching syntax, and required lookup criteria pairing.
    • Added prerouting raw examples for locally destined traffic and notrack handling.

Walkthrough

IPv4 and IPv6 firewall documentation now defines FIB lookup and route-type matching syntax, supported classifications, negated matching, lookup pairing, and prerouting raw handling examples.

Changes

FIB-type firewall matching

Layer / File(s) Summary
Document FIB-type matching
docs/configuration/firewall/ipv4.md:494-544, docs/configuration/firewall/ipv6.md:495-545
The IPv4 and IPv6 documentation describes source and destination FIB lookups, route-type matching for firewall chains, supported classifications, negated matches with !, required lookup pairing, and prerouting raw examples using local matching and notrack.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the documentation change for the firewall fib-type match.
Description check ✅ Passed The description directly explains the IPv4 and IPv6 fib-type documentation updates and related usage example.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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
✨ Simplify code
  • Create PR with simplified code

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@mergify mergify Bot added the rolling label Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Claude finished @ruben-herold's task in 2m 7s —— View job


Claude PR Review

  • Read Pass 1 findings (empty — deterministic check produced no issues)
  • Read changed docs (docs/configuration/firewall/ipv4.md, docs/configuration/firewall/ipv6.md)
  • Cross-reference with vyos-1x XML/Python source (vyos-1x PR #5372)
  • Verify fib-type CLI paths and options
  • Post summary

Issues

None (ERROR / WARNING). The documentation matches the companion vyos-1x PR #5372 accurately:

  • All 8 cfgcmd paths (forward filter, input filter, output filter, name, × source / destination) match the includes in common-rule-ipv4.xml.i and common-rule-ipv6.xml.i, which pull in fib-type.xml.i.
  • The 8 documented type values (local, unicast, broadcast, multicast, anycast, blackhole, unreachable, prohibited) exactly match the <completionHelp> list and the constraint regex (!?(local|unicast|broadcast|multicast|anycast|blackhole|unreachable|prohibited)) in interface-definitions/include/firewall/fib-type.xml.i.
  • Negation with ! prefix is correctly documented and matches the constraint's !? optional prefix.
  • The prerouting raw example in the prose is valid — fib-type.xml.i is also included from common-rule-ipv4-raw.xml.i / common-rule-ipv6-raw.xml.i, so the set firewall ipv4|ipv6 prerouting raw rule <N> destination fib-type local command is accepted by the CLI.
  • The single-description-inside-last-cfgcmd-block style matches the neighbouring address-mask / fqdn / geoip sections in the same file.

Needs Verification

  • INFO — The section documents fib-type only under forward filter / input filter / output filter / name, but the example uses prerouting raw. This is consistent with how address-mask, fqdn, and geoip are handled in the same section (they are also available in the raw includes but only documented under filter/name paths), so it is stylistically fine. Flagging only in case authors want to explicitly list the prerouting raw / output raw cfgcmd variants for discoverability.
  • INFO — For IPv6, the broadcast type value is accepted by the CLI (the constraint regex is shared with IPv4) but has no meaning on IPv6 (there is no IPv6 broadcast). Not a doc bug (the doc reflects what the CLI accepts), just worth being aware of.

Coordination note

vyos-1x PR #5372 (the feature PR this documents) is currently OPEN / not merged — the fib-type CLI node does not yet exist in vyos-1x rolling. This doc PR should merge only after (or together with) #5372, otherwise the docs will describe a command that doesn't exist on rolling images.

Stats

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
docs/configuration/firewall/ipv4.md (1)

517-526: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use single backticks in both MyST pages.

The added prose uses double backticks for inline code.

  • docs/configuration/firewall/ipv4.md#L517-L526: Replace double-delimited inline terms with single backticks.
  • docs/configuration/firewall/ipv6.md#L518-L527: Replace double-delimited inline terms with single backticks.

As per coding guidelines, MyST pages prefer single backticks for inline code; double backticks are reserved for embedded RST contexts.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/configuration/firewall/ipv4.md` around lines 517 - 526, Replace the
double-backtick inline markup with single backticks in the added prose at
docs/configuration/firewall/ipv4.md lines 517-526 and
docs/configuration/firewall/ipv6.md lines 518-527, covering the FIB, type
values, and negation character terms without changing the wording.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/configuration/firewall/ipv4.md`:
- Around line 494-516: Update the command references in
docs/configuration/firewall/ipv4.md lines 494-516 and
docs/configuration/firewall/ipv6.md lines 495-516 to include the supported
prerouting raw source and destination fib-type forms, matching the existing
forward, input, output, and named-rule forms; do not remove the prerouting raw
examples because they are part of the documented use case.

---

Nitpick comments:
In `@docs/configuration/firewall/ipv4.md`:
- Around line 517-526: Replace the double-backtick inline markup with single
backticks in the added prose at docs/configuration/firewall/ipv4.md lines
517-526 and docs/configuration/firewall/ipv6.md lines 518-527, covering the FIB,
type values, and negation character terms without changing the wording.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 1638c304-fa87-4325-bc8e-cd932438deff

📥 Commits

Reviewing files that changed from the base of the PR and between 3263d87 and b4e51ac.

📒 Files selected for processing (2)
  • docs/configuration/firewall/ipv4.md
  • docs/configuration/firewall/ipv6.md
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • ansible/ansible (manual)
📜 Review details
⏰ Context from checks skipped due to timeout. (3)
  • GitHub Check: validate
  • GitHub Check: Mergify Merge Protections
  • GitHub Check: Summary
🧰 Additional context used
📓 Path-based instructions (2)
docs/**/*.md

📄 CodeRabbit inference engine (AGENTS.md)

docs/**/*.md: Canonical docs pages must be written as MyST Markdown (.md); edit existing pages in .md only and never use the old md- prefix for new pages.
Use {cfgcmd}, {opcmd}, and {cmdincludemd} fenced directives in MyST pages for VyOS command coverage; do not replace them with plain text or bash fences.
Use MyST ATX headings (#, ##, ###, etc.) in canonical pages; the RST heading hierarchy does not apply to .md sources.
In MyST pages, prefer single backticks for inline code; double backticks are reserved for embedded RST contexts.
Use % stop_vyoslinter and % start_vyoslinter comment markers in top-level MyST content to suppress real IPs or other allowed long-line exceptions, and keep them paired.
In MyST pages, write TODO markers as {todo} fenced directives.

Files:

  • docs/configuration/firewall/ipv6.md
  • docs/configuration/firewall/ipv4.md
docs/{_include/*.txt,**/*.md}

📄 CodeRabbit inference engine (AGENTS.md)

Keep documentation lines within 80 characters unless the content is inside a code block or fenced/preformatted block.

Files:

  • docs/configuration/firewall/ipv6.md
  • docs/configuration/firewall/ipv4.md
🧠 Learnings (13)
📚 Learning: 2026-05-06T20:48:49.689Z
Learnt from: andamasov
Repo: vyos/vyos-documentation PR: 1902
File: CLAUDE.md:71-71
Timestamp: 2026-05-06T20:48:49.689Z
Learning: In vyos/vyos-documentation, the 80-character line-length rule documented under Source conventions / Formatting applies only to documentation source files located under docs/ (e.g., docs/**/*.rst and docs/**/*.md). The rule is enforced by the vyoslinter (doc-linter.py from vyos/.github) when reviewing changed files via lint-doc.yml, and only for files within docs/**. Do not suggest hard-wrapping CLAUDE.md (repo-root documentation) because GitHub renders and reflows content. For CLAUDE.md, reviews should not enforce the 80-char wrapping; apply the rule only to files matching **/docs/**/*.{rst,md}.

Applied to files:

  • docs/configuration/firewall/ipv6.md
  • docs/configuration/firewall/ipv4.md
📚 Learning: 2026-05-06T20:48:57.970Z
Learnt from: andamasov
Repo: vyos/vyos-documentation PR: 1902
File: CLAUDE.md:91-93
Timestamp: 2026-05-06T20:48:57.970Z
Learning: The 80-character line limit applies only to documentation sources under docs/** (RST/MD). Do not enforce this limit on repo-root Markdown files like CLAUDE.md or README.md. The vyoslinter (doc-linter.py, run via lint-doc.yml from vyos/.github) lints only changed files within docs/**; root files are excluded. GitHub renders root Markdown with viewport-width reflow, so hard-wrapping these files reduces readability without tooling benefit.

Applied to files:

  • docs/configuration/firewall/ipv6.md
  • docs/configuration/firewall/ipv4.md
📚 Learning: 2026-05-06T20:48:50.446Z
Learnt from: andamasov
Repo: vyos/vyos-documentation PR: 1902
File: CLAUDE.md:64-64
Timestamp: 2026-05-06T20:48:50.446Z
Learning: Enforce the 80-character line-length limit only for documentation source files under docs/ (docs/**/*.md and docs/**/*.rst rendered by Sphinx and linted by vyoslinter via lint-doc.yml). Do not flag line-length issues in repository-root Markdown files such as CLAUDE.md or README.md, which GitHub renders with viewport-width reflow. This applies to all files within docs/ that are part of the documentation source.

Applied to files:

  • docs/configuration/firewall/ipv6.md
  • docs/configuration/firewall/ipv4.md
📚 Learning: 2026-05-06T20:48:54.578Z
Learnt from: andamasov
Repo: vyos/vyos-documentation PR: 1902
File: CLAUDE.md:80-84
Timestamp: 2026-05-06T20:48:54.578Z
Learning: Enforce the 80-character line-length limit only for documentation source files under docs/ (docs/**/*.rst and docs/**/*.md). Do not flag repo-root files like CLAUDE.md or README.md, since they are rendered by GitHub and not subject to this rule. The doc-linter (doc-linter.py via lint-doc.yml) only lints docs/**, so CI checks won't flag root files for line length.

Applied to files:

  • docs/configuration/firewall/ipv6.md
  • docs/configuration/firewall/ipv4.md
📚 Learning: 2026-05-06T20:49:00.044Z
Learnt from: andamasov
Repo: vyos/vyos-documentation PR: 1902
File: CLAUDE.md:108-108
Timestamp: 2026-05-06T20:49:00.044Z
Learning: Limit the 80-character line length check and vyoslinter (doc-linter.py) enforcement to documentation source files under docs/**/*.{rst,md}. Do not apply or flag line-length issues in repo-root files like CLAUDE.md or README.md, which are rendered directly by GitHub and are not linted by lint-doc.yml. This pattern narrows checks to Sphinx source docs and prevents false positives in non-doc files.

Applied to files:

  • docs/configuration/firewall/ipv6.md
  • docs/configuration/firewall/ipv4.md
📚 Learning: 2026-05-06T20:48:53.302Z
Learnt from: andamasov
Repo: vyos/vyos-documentation PR: 1902
File: CLAUDE.md:79-79
Timestamp: 2026-05-06T20:48:53.302Z
Learning: Limit line length to 80 characters only for documentation sources under the docs directory (docs/**/*.rst and docs/**/*.md). This is enforced by the vyoslinter doc-linter.py (from the vyos/.github repo) via lint-doc.yml on changed files under docs/**. Do not flag line-length violations in repository-root Markdown files like CLAUDE.md or README.md, as they are rendered by GitHub and reflow in the UI.

Applied to files:

  • docs/configuration/firewall/ipv6.md
  • docs/configuration/firewall/ipv4.md
📚 Learning: 2026-05-06T20:49:10.359Z
Learnt from: andamasov
Repo: vyos/vyos-documentation PR: 1902
File: CLAUDE.md:142-142
Timestamp: 2026-05-06T20:49:10.359Z
Learning: In vyos/vyos-documentation, the 80-character line limit and vyoslinter enforcement apply only to documentation source files under docs/**/*.rst and docs/**/*.md that Sphinx renders. Repo-root files such as CLAUDE.md and README.md are outside the linter's scope (lint-doc.yml runs on docs/**) and are rendered by GitHub with automatic paragraph reflow — do not flag line-length violations in these files.

Applied to files:

  • docs/configuration/firewall/ipv6.md
  • docs/configuration/firewall/ipv4.md
📚 Learning: 2026-05-06T20:49:15.361Z
Learnt from: andamasov
Repo: vyos/vyos-documentation PR: 1902
File: CLAUDE.md:163-163
Timestamp: 2026-05-06T20:49:15.361Z
Learning: In vyos/vyos-documentation, enforce the 80-character line-length limit (Source conventions / Formatting) only for Sphinx documentation source files under docs/**/*.rst and docs/**/*.md. The lint-doc.yml workflow runs the doc-linter (doc-linter.py) and checks only docs/** changed files. Files in the repository root (e.g., CLAUDE.md, README.md) are rendered by GitHub and are not subject to this rule; do not flag line-length violations in those files.

Applied to files:

  • docs/configuration/firewall/ipv6.md
  • docs/configuration/firewall/ipv4.md
📚 Learning: 2026-05-08T07:01:22.978Z
Learnt from: andamasov
Repo: vyos/vyos-documentation PR: 1878
File: docs/troubleshooting/connectivity.rst:0-0
Timestamp: 2026-05-08T07:01:22.978Z
Learning: For the VyOS documentation (MyST-based docs), MyST directive opener lines must keep the entire directive arguments on a single line. This includes MyST fenced-directive openers like ```{opcmd} ... ``` and the RST-equivalent form .. opcmd:: ... when ported/used in MyST. Because the MyST parser does not support wrapped/continued directive arguments across multiple lines, do not raise/keep review warnings suggesting line wrapping for these directive opener lines due to line-length (even if they exceed 80 characters).

Applied to files:

  • docs/configuration/firewall/ipv6.md
  • docs/configuration/firewall/ipv4.md
📚 Learning: 2026-05-08T07:01:22.978Z
Learnt from: andamasov
Repo: vyos/vyos-documentation PR: 1878
File: docs/troubleshooting/connectivity.rst:0-0
Timestamp: 2026-05-08T07:01:22.978Z
Learning: In vyos/vyos-documentation, do not raise line-length (>80 chars) review findings for MyST directive opener lines (the directive “opener” that uses MyST directive syntax such as `{cfgcmd}` / `{opcmd}` fence/openers). CI does not enforce the 80-character limit for these specific opener lines, and existing documentation contains longer opener lines that pass lint.

Applied to files:

  • docs/configuration/firewall/ipv6.md
  • docs/configuration/firewall/ipv4.md
📚 Learning: 2026-05-13T22:16:06.198Z
Learnt from: andamasov
Repo: vyos/vyos-documentation PR: 2021
File: docs/automation/terraform/terraformvyos.md:14-14
Timestamp: 2026-05-13T22:16:06.198Z
Learning: In the vyos/vyos-documentation repo, when a PR is a byte-for-byte documentation port of an existing file from the rolling branch to a release branch (e.g., circinus, sagitta), keep the port content identical to the production-tested rolling source. For these ports, do not raise new review findings for documentation issues that are already present in the rolling source (for example, markdownlint MD059 like non-descriptive link text such as `[link]`/`[install]`). Instead, defer those existing issues to a rolling-side cleanup PR (e.g., `#2024`) and then backport the cleanup via Mergify.

Applied to files:

  • docs/configuration/firewall/ipv6.md
  • docs/configuration/firewall/ipv4.md
📚 Learning: 2026-05-13T22:43:41.056Z
Learnt from: andamasov
Repo: vyos/vyos-documentation PR: 2024
File: docs/automation/terraform/terraformvyos.md:0-0
Timestamp: 2026-05-13T22:43:41.056Z
Learning: In docs/**/*.md, for Markdown reference definition lines of the form `[label]: <URL>`, if the line cannot be shortened to <= 80 characters (because the URL itself is near/at the limit), suppress the vyoslinter warning by wrapping only that reference definition with a `% stop_vyoslinter` / `% start_vyoslinter` block. If the reference definition can fit within 80 characters, leave it outside any suppression block.

Applied to files:

  • docs/configuration/firewall/ipv6.md
  • docs/configuration/firewall/ipv4.md
📚 Learning: 2026-06-05T19:21:44.474Z
Learnt from: LiudmylaNad
Repo: vyos/vyos-documentation PR: 2066
File: docs/configuration/protocols/traffic-engineering.md:0-0
Timestamp: 2026-06-05T19:21:44.474Z
Learning: In the vyos/vyos-documentation MyST documentation pages, when writing CLI example invocations directly under a `{cfgcmd}` directive, use `none` fenced code blocks for those examples. Do not change these example blocks to `{opcmd}` or `{cfgcmd}`—`{opcmd}` is reserved for operational-mode commands, and the surrounding `{cfgcmd}` directive already documents the target command. Plain `none` blocks for these CLI examples are intentional and correct.

Applied to files:

  • docs/configuration/firewall/ipv6.md
  • docs/configuration/firewall/ipv4.md
🔍 Remote MCP Context7, vyos.dev

Relevant review context

  • T9157 is titled “Support fib daddr type / fib saddr type matching in firewall rules (especially prerouting raw)”; it is Open, Normal priority, and remains in Need Triage.
  • The task specifically requests matching local destinations without manually enumerating router addresses, with syntax such as destination fib-type 'local', followed by an accept rule and a catch-all notrack rule.
  • The documented feature corresponds to nftables FIB expressions, which can retrieve address types for packet source or destination addresses.
  • The task’s stated use case is prerouting raw, distinguishing locally destined traffic (retain conntrack) from forwarded traffic (apply notrack); this aligns with the PR’s example.
🔇 Additional comments (1)
docs/configuration/firewall/ipv4.md (1)

517-521: 🎯 Functional Correctness

Verify the address-type token in both pages.

The docs expose prohibited, while nftables documents the FIB token as prohibit. Confirm the VyOS parser and translator before release. (netfilter.org)

  • docs/configuration/firewall/ipv4.md#L517-L521: Verify or correct prohibited.
  • docs/configuration/firewall/ipv6.md#L518-L522: Verify or correct prohibited.

Based on the nftables reference, verify the VyOS-to-nftables token mapping before merge.

Comment thread docs/configuration/firewall/ipv4.md Outdated
Companion vyos-1x PR #5372 restructured the "fib-type" leaf into a
"fib" node with a "type" child (following feedback from l0crian1 and
sarthurdev to reserve the "fib" namespace for a possible future
lookup/match concatenation feature, tracked separately under T5119).
Update the CLI paths and examples here to match, and fix "prohibited"
to "prohibit" to match nftables' actual fib_addrtype token.
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Claude finished @ruben-herold's task in 4m 17s —— View job


Claude PR Review

  • Read Pass 1 findings (empty — deterministic check produced no issues)
  • Read changed docs (docs/configuration/firewall/ipv4.md, docs/configuration/firewall/ipv6.md)
  • Cross-reference with vyos-1x source (rolling checkout does not yet include the feature)
  • Verify against companion vyos-1x PR #5372 (fetched via gh pr diff)
  • Post summary

Issues

None (ERROR / WARNING).

The documentation matches the current state of companion vyos-1x PR #5372 accurately after the fib-typefib type rename in commit cba12db:

  • CLI structure — the vyos-1x PR uses a <node name="fib"> containing a <leafNode name="type">, and the smoketest confirms invocation as ... destination fib type local. The docs correctly use source fib type / destination fib type (nested), not the old fib-type leaf.
  • All 8 {cfgcmd} paths per file (forward filter, input filter, output filter, name × source / destination) match the include locations in common-rule-ipv{4,6}.xml.i.
  • The 8 type values (local, unicast, broadcast, multicast, anycast, blackhole, unreachable, prohibit) exactly match the <completionHelp> list and the constraint regex (!?(local|unicast|broadcast|multicast|anycast|blackhole|unreachable|prohibit)) in fib.xml.i. Note: the docs correctly use prohibit (not prohibited) — matches the XML.
  • Negation with ! prefix matches the constraint's !? optional group.
  • The prerouting raw example is valid — fib.xml.i is included from common-rule-ipv{4,6}-raw.xml.i, so set firewall ipv{4,6} prerouting raw rule <N> destination fib type local is accepted.
  • Style (single description inside the last {cfgcmd} block of the set) matches the neighbouring address-mask / fqdn / geoip sections in the same file.

Needs Verification

  • INFO / Nitpick (already raised by CodeRabbit) — Per AGENTS.md:170-172, MyST pages should use single backticks for inline code; double backticks are reserved for {eval-rst} blocks and _include/*.txt. The added prose at docs/configuration/firewall/ipv4.md:517-521 and docs/configuration/firewall/ipv6.md:518-522 uses double backticks around type, local, unicast, …, prohibit, !, and prerouting raw. Consider switching to single backticks for consistency with the canonical MyST convention. Fix this →
  • INFO — For IPv6, the broadcast type value is accepted by the CLI (the constraint regex is shared with IPv4) but has no meaning on IPv6 (no IPv6 broadcast). Not a doc bug (the doc reflects what the CLI accepts), just worth being aware of.
  • INFOfib.xml.i is also included in common-rule-ipv{4,6}-raw.xml.i, so prerouting raw and output raw also accept these commands. The docs only list them under filter/name paths, which is stylistically consistent with address-mask / fqdn / geoip (same treatment). Flagging only in case the authors want to enumerate the raw variants explicitly for discoverability.

Coordination note

vyos-1x PR #5372 (the feature PR this documents) is currently OPEN / not merged — the fib node does not yet exist in vyos-1x rolling. This doc PR should merge only after (or together with) #5372, otherwise the docs will describe a command that doesn't exist on rolling images.

Stats

CodeRabbit feedback on vyos#2186:
- the prose showed a "prerouting raw" example but the command
  reference only listed forward/input/output/name filter forms, even
  though fib.xml.i is also included from common-rule-ipv{4,6}-raw.xml.i
  for that hook. Add the missing source/destination cfgcmd entries.
- MyST pages use single backticks for inline code, not double
  (that's for embedded RST); fix the fib type prose accordingly.
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Claude finished @ruben-herold's task in 1m 27s —— View job


Claude PR Review

  • Read Pass 1 findings (empty — deterministic check produced no issues)
  • Read changed docs (docs/configuration/firewall/ipv4.md, docs/configuration/firewall/ipv6.md)
  • Cross-reference with vyos-1x PR #5372 (via gh pr diff)
  • Verify latest commit f96fb11 addresses prior review nitpicks
  • Post summary

Issues

None (ERROR / WARNING).

Commit f96fb11 cleanly addresses both prior CodeRabbit nitpicks:

  • Backtick style — prose at docs/configuration/firewall/ipv4.md:524-527 and docs/configuration/firewall/ipv6.md:525-528 now uses single backticks (`type`, `local`, …, `prohibit`, `!`, `prerouting raw`), matching the MyST convention in AGENTS.md:170-172.
  • prerouting raw reference — two additional {cfgcmd} blocks per file document set firewall ipv{4,6} prerouting raw rule <N> source fib type … and … destination fib type … (ipv4.md:518-522, ipv6.md:519-523). These match fib.xml.i being included from common-rule-ipv{4,6}-raw.xml.i in vyos-1x PR #5372.

Overall correctness against companion PR vyos/vyos-1x#5372:

  • CLI structure — docs use nested source fib type / destination fib type, matching <node name="fib"><leafNode name="type"> in interface-definitions/include/firewall/fib.xml.i (added by #5372).
  • All 8 documented type values (local, unicast, broadcast, multicast, anycast, blackhole, unreachable, prohibit) exactly match the <completionHelp> list and constraint regex (!?(local|unicast|broadcast|multicast|anycast|blackhole|unreachable|prohibit)).
  • Negation ! prefix matches the !? optional group in the constraint.
  • All 20 {cfgcmd} blocks per file (8 filter/name × 2 sides + 2 raw × 2 sides = 20 total across both files) correspond to real include locations.
  • The 2-rule prerouting raw prose example (accept locally destined → notrack the rest) is valid and matches the documented T9157 use case.
  • Style (single description inside the last {cfgcmd} block of the set) matches the neighbouring address-mask / fqdn / geoip sections.

Needs Verification

  • INFO — For IPv6, the broadcast type value is accepted by the CLI (the constraint regex is shared with IPv4) but has no meaning on IPv6 (no IPv6 broadcast). Not a doc bug (the doc reflects what the CLI accepts). Optional to note in the IPv6 prose.
  • INFOfib.xml.i is also included from common-rule-ipv{4,6}-raw.xml.i's output chain, so set firewall ipv{4,6} output raw rule <N> {source,destination} fib type … is also accepted. The docs only enumerate prerouting raw (which is the primary documented use case per T9157), not output raw. Stylistically consistent with how address-mask / fqdn / geoip are handled (they don't enumerate every raw variant either). Flag only if authors want full raw-chain coverage for discoverability.

Coordination note

Companion vyos-1x PR #5372 remains OPEN / not merged — the fib node does not yet exist on the rolling vyos-1x branch. This docs PR should merge only after (or together with) #5372.

Stats

  • Validated 2 MyST files. Skipped 0 RST files awaiting MyST migration.
  • Files reviewed: docs/configuration/firewall/ipv4.md, docs/configuration/firewall/ipv6.md.
  • Commands checked: 20 {cfgcmd} blocks (10 per file: 4 source filter/name + 4 destination filter/name + 2 prerouting raw) + 1 prerouting raw prose example per file.
  • Branch reviewed: rolling (vyos-1x: rolling, cross-checked against open PR vyos/vyos-1x#5372 via gh pr diff).
    • Branch: T9157-fib-type-match

Companion vyos-1x PR #5372 moved "fib" from a leaf nested under
destination/source to a rule-level node with separate "lookup"
(source-address/destination-address) and "match route-type" children,
per l0crian1's review feedback - reserving room for mark/iif/oif
lookup keys and oif/oifname match results later (tracked under T5119)
without ever renaming what ships now. Update the CLI paths and
examples here to match.
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Claude finished @ruben-herold's task in 1m 56s —— View job


Claude PR Review

  • Read Pass 1 findings (empty — deterministic check produced no issues)
  • Read changed docs (docs/configuration/firewall/ipv4.md, docs/configuration/firewall/ipv6.md)
  • Cross-reference companion vyos-1x PR #5372 via gh pr diff (fib.xml.i, verify_rule, smoketest)
  • Verify latest commit 0a218a0 (rule-level fib lookup / fib match route-type split)
  • Post summary

Issues

None (ERROR / WARNING).

Commit 0a218a0 re-aligns the docs with the new rule-level fib structure introduced upstream:

  • CLI structure — docs now use fib lookup [source-address | destination-address] and fib match route-type [<type> | !<type>] as sibling paths on the rule (no longer source fib type / destination fib type). This matches interface-definitions/include/firewall/fib.xml.i in PR #5372:
    • <node name="fib"><leafNode name="lookup"> with constraint (source-address|destination-address)
    • <node name="fib"><node name="match"><leafNode name="route-type">
  • The 8 documented type values (local, unicast, broadcast, multicast, anycast, blackhole, unreachable, prohibit) exactly match the <completionHelp> list and the constraint regex (!?(local|unicast|broadcast|multicast|anycast|blackhole|unreachable|prohibit)).
  • Negation ! prefix matches the !? optional group in the constraint.
  • All 10 {cfgcmd} blocks per file (5 for lookup + 5 for match route-type, covering forward filter, input filter, output filter, name, prerouting raw) map to include locations: fib.xml.i is pulled in from common-rule-ipv{4,6}.xml.i (filter/name chains) and common-rule-ipv{4,6}-raw.xml.i (raw chains).
  • Prose accurately describes the semantics: source-address = reverse-path lookup, destination-address = normal route lookup — matches nftables' fib saddr type / fib daddr type translation in python/vyos/firewall.py.
  • The doc says "both lookup and match route-type must be configured together" — this precisely matches verify_rule in src/conf_mode/firewall.py (raises ConfigError if either is missing), and is exercised by the new test_fib_type_incomplete smoketest.
  • The 2-rule prerouting raw example (accept route-type local first, then notrack catch-all) matches the smoketest pattern in test_firewall.py::test_fib_type and the T9157 use case.
  • Style (single description inside the last {cfgcmd} block of the set) and backtick usage (single backticks in prose) are consistent with AGENTS.md:170-172 and the neighbouring address-mask / fqdn / geoip sections.

Needs Verification

  • INFOfib.xml.i is included from common-rule-ipv{4,6}-raw.xml.i, which is also pulled in by output raw (verified in ipv{4,6}-hook-output.xml.i). So set firewall ipv{4,6} output raw rule <N> fib … is also accepted, but the docs only enumerate prerouting raw. Stylistically consistent with how address-mask/fqdn/geoip are handled (they also don't enumerate every raw variant). Flag only if authors want full raw-chain coverage for discoverability.
  • INFO — For IPv6, broadcast is accepted by the constraint regex (shared with IPv4) but has no meaning on IPv6 (no IPv6 broadcast). Not a doc bug (the doc reflects what the CLI accepts). Optional to note in the IPv6 prose.

Coordination note

Companion vyos-1x PR #5372 is OPEN / not merged (state: OPEN, mergeable, last updated 2026-08-04). The fib node does not yet exist on the vyos-1x rolling branch. This docs PR should merge only after (or together with) #5372.

Stats

  • Validated 2 MyST files. Skipped 0 RST files awaiting MyST migration.
  • Files reviewed: docs/configuration/firewall/ipv4.md, docs/configuration/firewall/ipv6.md.
  • Commands checked: 20 {cfgcmd} blocks (10 per file: 5 fib lookup + 5 fib match route-type) + 1 prerouting raw prose example per file.
  • Branch reviewed: rolling (vyos-1x: rolling, cross-checked against open PR vyos/vyos-1x#5372 via gh pr diff).
    • Branch: T9157-fib-type-match

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant