Skip to content

feat(goip): vrf show NAME -4/-6/-0 family forms (VF0-VF2) - #289

Closed
randomizedcoder wants to merge 5 commits into
mainfrom
goip-vrf-show-family
Closed

randomizedcoder wants to merge 5 commits into
mainfrom
goip-vrf-show-family

Conversation

@randomizedcoder

Copy link
Copy Markdown
Owner

goip -4/-6/-0 vrf show NAME used to be refused. Plan: docs/netlink/vrf-family-forms.md (VF0–VF2).

  • Why it's safe: the family flag changes only the request ifi_family byte (iplink_vrf.c:110-113), and the kernel resolves the name without reading the family (rtnetlink.c:4346-4355), so the output matches plain vrf show NAME.
  • VF0: captures -4/-6/-0 vrf show goipvrf in base, mesh and tunnel (18 fixtures); TestVrfFamilyFormsRequestIsTheNameGet checks that byte 16 is the only difference from the plain request.
  • VF1: removes vrfShowName's family guard; the dump-form family refusal stays. Adds replay and corpus rows.
  • VF2: adds three parity matrix rows, all gated; the matrix moves from 510/509 to 513/512.
  • Also: fixes the maddress pin note in goip-parity-gaps.md (b8cdda55 is v7.3.0, not 7.2.0).
  • Validation: go test/vet, test-focused-goip, netlink-audit, lint-baseline, quality-report and the nix hygiene checks pass; GOIP_PARITY_OVERALL_PASS in two back-to-back gated runs; a mutation check on each step kills exactly the expected tests.

🤖 Generated with Claude Code

…t 7.2.0

The gaps doc class C note claimed "the 7.2 checkout dumps
RTM_GETMULTICAST" (citing ipmaddr.c:276), which made maddress the
next object at the 7.2.0 pin. It was written against a post-7.3.0
dev snapshot misread as 7.2: read_maddr_netlink is commit b8cdda55,
first released in v7.3.0. At the 7.2.0 pin every maddress form reads
/proc, family-filtered included — measured 2026-11-04, when a capture
run for two ip -4/-6 maddress show rows recorded zero netlink
datagrams in all three namespaces and missed its floors, exactly the
failure the floors exist to catch. maddress moves to class C at the
7.3.0 pin bump, not the 7.2.0 one; the class F row and the mcdump
helper comment (which said b8cdda55 was "in no release") are amended
to the same truth. The reply decode needs no rework either way — the
addr plan mcdump captures already ground IFA_MULTICAST/IFA_MC_USERS.

A plan doc and builder started on the false premise were reverted;
nothing of it landed.
The parked decision-8 increment reopened: vrf-show-name.md refused the
family forms on the NAME path only because no capture grounds the
ifi_family byte. The kernel resolves the name without consulting the
family (rtnetlink.c:4346-4355), so the three forms are VS0's pinned
44-byte get with one byte changed, and the object delta is deleting
vrfShowName's guard (obj_vrf.go:89-91) — line 93 already passes
c.family.

Three tasks: VF0 the captures (three rows, three namespaces, the
ENODEV arm grounded for free where goipvrf does not exist) with the
family-byte pin as the fixture consumer; VF1 the guard deletion, the
flipped TestVrfShowName corner row and the family replay test, the
corpus rows; VF2 three matrix rows and gating.

Chosen after the maddress plan was reverted: a capture run measured
zero netlink datagrams for ip -4/-6 maddress show at the 7.2.0 pin —
read_maddr_netlink is commit b8cdda55, first released in v7.3.0 —
and the corrective commit 393cdb5 amended the gaps doc note that
had said otherwise. maddress waits for the 7.3.0 pin bump.
…e (VF0-T01)

Three capio rows in the dump-capture driver — ip -4/-6/-0 vrf show
goipvrf — floor 2, every namespace: the -4/-6/-0 flag changes only
the request ifi_family byte (iplink_vrf.c:110-113), and the kernel
resolves the name without consulting the family (rtnetlink.c
:4346-4355), so base answers the vrf link itself (goipvrf 100 on
stdout) and mesh and tunnel answer NLMSG_ERROR ENODEV (Invalid VRF on
stderr, dropped by read rows). 18 files under
pkg/xtcpnl/testdata/7_3_0/dumps/{,mesh/,tunnel/}.

TestVrfFamilyFormsRequestIsTheNameGet, the fixture consumer: each
recorded get is byte-identical to req.VrfCheckByName(family, goipvrf)
with seq/pid zeroed, the family byte at offset 16 is the only delta
from the plain form VS0 pinned, and the reply is the right shape per
namespace. Mutation check in a scratch worktree: VrfCheckByName
hardcoding AF_UNSPEC kills exactly the nine byte-compare subtests and
nothing else.

NLCAP_DRIVER_PASS; go test, go vet, test-focused-goip, vm-lib-exp,
netlink-audit, lint-baseline, quality-report and the nix hygiene
checks green. Ledger VF001; the plan doc flips VF0-T01.
vrfShowName's family refusal is gone: the -4/-6/-0 flag passes
through to the request ifi_family byte (iplink_vrf.c:110-113), and
the kernel resolves the name without consulting the family
(rtnetlink.c:4346-4355), so all three forms print the plain form
line. The dump form family refusal is untouched — the family
genuinely changes the dump shape there.

TestVrfShowName's -4 corner row flips to a positive row; three
family rows join TestVrfShowNameReplay, each replaying its own VF0
capture through the family-blind dump fallback; three cleanOnly
corpus rows walk the captures in all three namespaces, mesh and
tunnel refusing with Invalid VRF as the plain NAME row does.

Mutation check in a scratch worktree: the guard restored verbatim
failed exactly the seven family rows and nothing else. go test, go
vet, test-focused-goip, netlink-audit, lint-baseline, quality-report
and the nix hygiene checks green. Ledger VF002; the plan doc flips
VF1-T01.
…(VF2-T01)

Three read rows in internal/goipparity/commands.go vrf block: -4,
-6 and -0 vrf show goipvrf — the parked decision-8 family forms.
The family flag changes only the request ifi_family byte
(iplink_vrf.c:110-113); the kernel resolves the name without
consulting the family (rtnetlink.c:4346-4355), so the answer and
stdout are the plain NAME row own and the floor with it. All floor 2,
Implemented, no Setup, no Write.

Gated on the doctrine pair: two clean ungated runs measured the rows
(513/513 GOIP_PARITY_PASS, txns ip=1 goip=1, control nl=0 stdout=0,
the answer byte-identical), then two back-to-back gated runs with no
edit of any kind between them read the same. All four
GOIP_PARITY_DRIVER_PASS and GOIP_PARITY_OVERALL_PASS with
GOIP_PARITY_UNGATED_CLEAN. The three names join gated_commands (512
now) and the earned slice; TestVrfFamilyFormRowsGated pins the flip
and the three family rows join TestFamilyTableAndJSONRows;
TestUngatedSurfaceIsNotVacuous is back to exactly addr show dynamic.

coverage-status at-a-glance 510/509 to 513/512 (counted from
2026-11-04) and the README counts likewise; the plan doc flips VF2-T01
and records VF003. Mutation check: the -6 row dropped from commands.go
killed exactly its four pins.
@randomizedcoder

Copy link
Copy Markdown
Owner Author

Duplicate of #288, which carries the same VF0–VF2 commits plus the review fixes.

@randomizedcoder
randomizedcoder deleted the goip-vrf-show-family branch November 9, 2026 20:28
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