Repository navigation
gobridge: increment 27 - vlan add, del, set and global set writes - #403
Merged
Merged
Conversation
randomizedcoder
added a commit
that referenced
this pull request
Dec 6, 2026
… -1 vid_end Three parses where gobridge differed from bridge 7.2.0, each confirmed on the host first. strtoMag reads glibc 2.38's C23 0b prefix with base 0 (mcast_router 0b10 is 2), for the vlan and link writes alike. A single tunnel id keeps the end a repeated tunnel_info left, as parse_tunnel_info writes tun_id_end only for a range. global set assigns vid_end on every range word, so a 65535 end (-1) clears it. Table rows pin each, and fail with the fix reverted; B96, B97 and B104 gain extension lines (V125). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…B91-B104 and K29-K43 IsAdmittedWriteType admits RTM_NEWVLAN (bridge vlan set and global set) and FamilyHdrLen models its br_vlan_msg; RTM_GETVLAN and RTM_DELVLAN stay unmodeled. vlan.go's three refusals go through vlanModify, vlanSet and vlanGlobalSet, which still refuse by name in both builds until 27W. send_write.go's "third copy" comment is corrected. TestBridgeWriteAdmitted and TestBridgeWriteAdmittedBuild pin the gate; TestGobridgeWriteRefusedUntagged covers the vlan writes. The bridge write doc gains the increment 27 section, every lead predicted (V120). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… new matrix_brvlanwrite.go generates bridge vlan add, del, set and global set rows over nine fixtures: 121 accepted writes, each with a readback of its kind, 106 refusals and 12 batches. Two batches on one boot are identical in rc, output, readbacks and request bytes. B91-B104 and K29-K38, K40-K42 confirmed; K43 corrected (the clamp is logged), K39 source only; B105 (unsigned parsers take a sign) and K44 (an unchecked interval reads back as 1844674407370) are new. K29, K30 and K44 are written up on their own, the partial applies are added to the K25 note, and B89, B88 and B21 gain extension lines (V121). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nWrite BuildBrVlanModifyRequest lays out vlan_modify's RTM_SETLINK/DELLINK (IFLA_AF_SPEC with VLAN_INFO or TUNNEL_INFO) and BuildBrVlanOptsRequest vlan_option_set's and vlan_global_option_set's RTM_NEWVLAN, its options an ordered list so repeats and command-line order survive. Tagged gobridge_write; the option constants join the untagged decoder. TestWsBrVlanWrite rebuilds all 173 captured writes byte for byte and checks 121 accepted writes against the kernel's readback, the K43/K44 changes asserted. TestBrVlanWriteEncode pins the layout (V122). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vlan_write.go is vlan_modify, vlan_option_set and vlan_global_option_set as v7.2.0 writes them: vid narrowed to a short with its -1 sentinel, the range state kept across a repeated vid, tunnel_info replacing VLAN_INFO, help a swallowing prefix, options in command-line order, get_u* base 0 with a sign, and addattr_l's bound. With gobridge_write all 230 brvlanwrite rows replay byte for byte; untagged each is refused by name. B106: an option past addattr_l's bound (1048 for set, 1024 for global set's options) is printed and dropped, and the request sent, rc 0; three rows captured twice confirm it. The write corpora and readbacks are table-driven; fuzz 60 s clean, 8 of 8 mutants killed, coverage 85.3% (V123). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…extension lines The increment 27 section of iproute2-bridge-write.md gains its HEAD check: iproute2 d7e038f9 has every lead (addattr_l's padding fix cf4eec51 leaves B106's bound), torvalds 8e5ca834ee39 every K note's code. B5, B80 and B82-B85 gain "Extended in increment 27" lines, gobridge.md its increment 27 section, and the next free DOC is DOC041. The doc checklist passes (DOC040). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On the workbench (kernel 7.3.1, bridge 7.2.0), tagged gobridge ran dry beside bridge on all 230 rows in two batches: requests identical on 230 of 230 (176 writes), bridge's own refusals 52 of 52, readbacks 124 of 124, and bridge identical to its corpus on 230 of 230. The batches agree on all 2,046 result files; the guest was left as found (V124). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A tagged switch in vlanGlobalSet (QF1002), a BrVlanOptU8 doc comment of the right form (ST1020), a conversion in place of a struct literal (S1016), and two preallocated slices in the tests (prealloc). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… -1 vid_end Three parses where gobridge differed from bridge 7.2.0, each confirmed on the host first. strtoMag reads glibc 2.38's C23 0b prefix with base 0 (mcast_router 0b10 is 2), for the vlan and link writes alike. A single tunnel id keeps the end a repeated tunnel_info left, as parse_tunnel_info writes tun_id_end only for a range. global set assigns vid_end on every range word, so a 65535 end (-1) clears it. Table rows pin each, and fail with the fix reverted; B96, B97 and B104 gain extension lines (V125). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
randomizedcoder
force-pushed
the
gobridge/vlan-write
branch
from
December 6, 2026 17:12
c660e7b to
016a037
Compare
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.
What
Increment 27: gobridge clones
bridge vlan add,del,setandglobal set(iproute2 v7.2.0bridge/vlan.c). As in increment 26, writes are built only with thegobridge_writetag and run dry: replay byte-matches the request, live writes it toGOBRIDGE_WRITE_OUT. Untagged builds refuse each by name.IsAdmittedWriteTypeadmits RTM_NEWVLAN (RTM_DELVLAN stays out);FamilyHdrLenmodelsbr_vlan_msg; vlan.go dispatches to refusal stubs.ws/brvlanwritecapture space, 230 rows over nine fixtures (121 accepted writes with readbacks, refusals, batches); two batches on one boot agree.BuildBrVlanModifyRequest(SETLINK/DELLINK, VLAN_INFO or TUNNEL_INFO) andBuildBrVlanOptsRequest(NEWVLAN, options as an ordered list so command-line order and repeats survive).TestWsBrVlanWriterebuilds every captured write byte for byte and checks accepted writes against the kernel's readback.internal/gobridge/vlan_write.go; all 230 rows replay byte for byte. Fuzz 60 s clean, 8/8 mutants killed, coverage 85.3%.upstream/iproute2-bridge-write.md, HEAD check (iproute2d7e038f9, torvalds8e5ca834ee39), extension lines; next free DOC is DOC041.Upstream findings (recorded only under
docs/netlink/upstream/)atoiintoshortand its-1sentinel, range state leaking across a repeatedvid,tunnel_infosilently dropping flags,helpswallowing a word, unsigned parsers taking a sign (B105), options pastaddattr_l's bound dropped with rc 0 (B106).kernel-bridge-dellink-drops-extack.md(K29),kernel-bridge-vlan-del-missing-acked.md(K30),kernel-bridge-vlan-interval-readback-overflow.md(K44); partial applies added to the K25 note.Review fixes (c660e7b)
Three parses where gobridge differed from bridge 7.2.0, each confirmed on the host first:
0bnumbers: glibc 2.38+ reads a0bprefix in base 0 (mcast_router 0b10is 2); fixed in the shared parser, solink setgets it too.tunnel_infowith one id keeps the earlier end id, as bridge does.global set vid 10-20 vid 40000-65535: the 65535 end (-1) clearsvid_end, so no second RANGE is sent.12 new table rows, each failing with its fix reverted; B96, B97 and B104 gain extension lines (V125).
Gates (at 016a037, rebased on main 173217a)
go test ./...: pass-tags gobridge_writetests of gobridge, xtcpnl, nlparity, nlcapgen: pass; both write fuzzers 30 s clean🤖 Generated with Claude Code