Repository navigation
gobridge: increment 26 - bridge link set and mst set, dry-run writes - #397
Merged
Merged
Conversation
…ve GET guard (V115) - gobridge_write tag wired as gotc_write is: versions.nix (optInOnlyTags, gobridgeWriteTags), flavor-tags, govulncheck, the golangci tag lists and a focused-gobridge-write test. pkg/xtcpnl's BuildWriteRequest builds under it. The default gobridge stays untagged. - no-write-encoders: internal/gobridge joins writePkgs; a completeness loop ties the tag to *_write.go names; a positive control on cmd/gobridge with the tag (a per-daemon one waits for 26P); the default debug gobridge must link no write builder. - send_write.go (tagged): gotc's deliverWrite/writeOut, second copy. Replay answers with the recorded ack (NAK -> retCode(-1)); live goes to GOBRIDGE_WRITE_OUT or ErrWriteNotApplied. write_off.go keeps link set and mst set refused by name. - LiveSource.Talk refuses anything but an RTM_GET* in every build. - upstream/iproute2-bridge-write.md: B77-B90 and K18-K24, predicted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s (V116) - matrix_brlinkwrite.go: bridge link set and mst set over five fixtures (brl, brlstp, brldown, brmst, brmstoff). 92 accepted writes, each with a readback (bridge -d link show / bridge mst show dev d1), 46 refusals and 3 -force batches. - Captured on the workbench (kernel 7.3.1, bridge 7.2.0), batch A and B identical in rc/stderr/stdout/readbacks; bodies differ only in the forward-delay timer and ll_init_map's ifi_flags (V097's classes). - upstream/iproute2-bridge-write.md: B77-B90 and K18-K22 confirmed, K23/K24 corrected, K25 (br_setport applies flags before the range checks, so a refused write is partly applied) and K26 new. - TestBrLinkWriteSpace pins every lead and K note to a row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…(V117) - xtcpnl_bridge_write.go (gobridge_write): BrPortProtinfo (24 IFLA_BRPORT_* in brlink_modify's order), BrAfSpecFlags, BrMstEntry, BrLinkWrite and BuildBrLinkWriteRequest. Tagged rather than untagged as planned, so no daemon carries a bridge write layout (decision log). - no-write-encoders: the per-daemon ,gobridge_write control is back, naming xtcpnl_bridge_write.go. - TestWsBrLinkWrite rebuilds all 118 captured SETLINKs byte for byte, checks bridge refusals send none, and checks 91 accepted writes against the kernel's readback dump. TestBrLinkWriteEncode pins layout, widths, the empty PROTINFO and the NLA_F_NESTED conventions. - Found: K27 (learning_sync is acked and ignored by a software bridge) and K28 (state blocking does not stick without STP). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- link_write.go (gobridge_write): brlink_modify, C's narrowings via new pkg/cint conversions (IntToSChar, IntToShort, LongToSChar, LongToU16), parse_on_off's -EINVAL (rc 234), hwmode assigning flags, PROTINFO always sent, dev checked last, the three device texts; C strtol/get_s32/get_u32. - mst_write.go (gobridge_write): mst_set, the *s MSTI check, __u16 MSTI. - link.go/mst.go dispatch to linkWrite/mstWrite; write_off.go refuses. - TestGobridgeCorpus replays all 141 brlinkwrite rows byte for byte when tagged (485 rows total); untagged, TestGobridgeWriteCorpusRefused holds each to the refusal. 92 readbacks replay in both builds. - Unit tables: link set 40, batch 4, mst set 20, C numbers 13. - FuzzGobridgeLinkSet: 60 s, 1.03M execs, nothing found. 8/8 mutants killed. Coverage 84.3% tagged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- upstream/iproute2-bridge-write.md: HEAD check (iproute2 d7e038f99479, torvalds 28a23309c8e4): every B lead present, every K note's code unchanged; At HEAD and gobridge columns filled. - K25 and K27 written up on their own: kernel-bridge-setport-partial-apply.md and kernel-bridge-learning-sync-ignored.md. Not submitted anywhere. - B64 gains an "Extended in increment 26" line: do_mst never zeroes timestamp. - gobridge.md: Increment 26 section. Checklist passes; four mutated copies of the doc fail it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lint-baseline at 2decedb1e gained tier1 gocyclo (linkWrite 32 > 30) and tier2 goconst/prealloc findings, all from 26W: - the shared words (locked, master, self, state, learning, mcast_max_groups, mcast_router, neigh_forward_grat, neigh_suppress) are constants beside wordDev, used across the package's printers and parsers; - linkWrite's per-word switch moves to linkWord over a linkArgs struct; - the fuzz target preallocates its replies. Tests pass in both builds; the 8 mutants are still killed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gobridge (gobridge_write, dry run to GOBRIDGE_WRITE_OUT) beside bridge 7.2.0 (applied, nlmon captured) on the workbench, kernel 7.3.1: requests identical 141/141, bridge's own refusals 22/22, readbacks 92/92, in two batches agreeing on all 1,148 files; bridge matches its corpus 141/141. Nothing new found. Increment 26 complete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rebased on main 4a9a934, which renumbered 25B from DOC035 to DOC038 (the events plan holds DOC035-DOC037; DOC IDs are repo-unique). 26B had taken DOC036, the events plan's too: it becomes DOC039, the next free, in gobridge.md, gobridge-status.md and the note, and events-export-status's next-free line moves to DOC040. The summary table's 25 row still said DOC035; it now says DOC038. The upstream index gains the three notes increment 26 added, the gap main's 81bea3a closed for increment 25: iproute2-bridge-write.md (B77-B90, K18-K28), kernel-bridge-setport-partial-apply.md (K25) and kernel-bridge-learning-sync-ignored.md (K27). Co-Authored-By: Claude Opus 5.5 <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.
Increment 26: gobridge's first writes,
bridge link setandbridge mst set. They are built only with the new opt-ingobridge_writetag, and even then a write is never applied: a replay source answers it from the recorded capture, and a live source writes the request toGOBRIDGE_WRITE_OUT(unset, it fails withErrWriteNotApplied). The defaultgobridgestill refuses both by name, and neither daemon carries any bridge write code.Commits
gobridge_writetag, wired into nix, flavor-tags, govulncheck, the golangci tag lists and afocused-gobridge-writecheck;send_write.go), withwrite_off.gorefusing in the untagged build;LiveSource.Talknow refuses any non-GET request in every build;internal/gobridge:*_write.gofiles carry the tag, and acmd/gobridgecontrol checks that.brlinkwritecapture space, 141 rows: 92 accepted (each with a readback), 46 refused, 3-forcebatches. Captured twice on one boot; the two batches agree.pkg/xtcpnl: the bridge port write encoders (BuildBrLinkWriteRequest). They are behind the tag rather than untagged as planned, so no daemon links them.TestWsBrLinkWriterebuilds all 118 captured SETLINKs byte for byte and checks 91 against the kernel's readback.gobridge:link_write.goandmst_write.go, copying brlink_modify and mst_set, C number narrowing included. Four newpkg/cinthelpers handle the narrowing so gosec is fixed in code.upstream/iproute2-bridge-write.mdcompleted, with a HEAD check of both trees, plus two standalone kernel notes.linkWritesplit, preallocation), and DOC036 renumbered to DOC039 after rebasing on main (the events plan holds DOC035–DOC037; see docs(upstream): the bridge monitor note's index row, and the DOC035 collision (PR #388's gap) #394), with the upstream index rows for the three new notes.Results
brlinkwriterows included, requests too; so do the 92 new readbacks. Untagged, every write row is refused by name.bridge7.2.0's on 141 of 141 rows, in two runs that agree exactly; livebridgematched the capture on 141 of 141.TestGobridgeLinkWrite40 rows,TestGobridgeMstWrite20,TestGobridgeWriteOut12,TestGobridgeIsGetRequest16;FuzzGobridgeLinkSetran 60 s (1.03M executions) and found nothing;internal/gobridgecoverage 84.3% with the tag.docs/netlink/upstream/, nothing sent to netdev):d7e038f99479). Examples:mcast_router abcturns router mode off,msti ""is sent as MSTI 0, andmsti 70000as 4464.hairpin on cost 70000gets ERANGE, yet hairpin ends up on); K27, a software bridge ackslearning_syncand ignores it.Gates
At fe9e932 (the head; code identical to c696584a4):
At c696584a4 / 216dc015a (before the rebase on main, which brought docs only):
go test ./...: 114 packages pass🤖 Generated with Claude Code