Repository navigation
gobridge: bridge monitor, live and file (increment 25) - #388
Merged
Merged
Conversation
…X, V110) - internal/nlmon gains NlmsgTstampCst and TstampText (print_nlmsg_timestamp), moved from goip, which now calls it; TestNlmonTstampText pins 9 rows. - netlink-capture.nix: xtcp2-nl-tcmon's body becomes mkMonHelper; the new xtcp2-nl-brmon-ws finds bridge monitor's socket by its inode, since a bare monitor binds ~RTMGRP_TC and a vlan/vni one no group at all. - nix/checks/nlcap-brmon-ws.nix: 13 hermetic rows; nlcap-tcmon unchanged. - docs/netlink/upstream/iproute2-bridge-monitor.md: B58-B75 and K10-K16, predicted, not submitted to netdev. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tools/nlcapgen's brmonitor space: 18 live rows of `bridge monitor` under xtcp2-nl-brmon-ws over five fixtures (each selector with a NEW and a DEL, bare, all, word order, prefixes, a plain dummy, -t, -j, -d, -s); 12 file and batch rows over 19 records cut from the live rows' own notifications; 14 negatives. Captured on the workbench (7.3.1, iproute2 7.2.0): two batches on one boot identical with stamps masked, the live rows identical across boots. TestBrMonitorSpace pins one case per row, the record files (each record's attributes end at its body's end), and determinism. upstream/iproute2-bridge-monitor.md: 20 leads confirmed with their rows, B62 and K11 corrected, B71 dropped, B68 and B74 source only; new B76 (vlan.c prints "state disabled" for an RTM_DELVLAN, which carries no STATE) and K17 (a vlan add on a port notifies its local fdb entry). iproute2-bridge-print-paths.md gains increment 25 lines on B28/B29 and B30. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BrEventKind names the bridge object of a monitor event as bridge's accept_msg dispatches it: NEW and DEL of link, neigh, mdb, vlan and tunnel, plus NLMSG_TSTAMP. TestWsBrMonitor decodes all 307 bridge events in ws/brmonitor (pcaps and the ec rows' record files) with the existing parsers and pins K11-K17 and B76 on the wire. Benchmarks for both. IsRtnetlinkEventType keeps its set: it mirrors ParseRtnetlinkEvent, which has no arm for the bridge types. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
monitor.go is bridge/monitor.c: do_monitor's words in its order (B59, B60), the bind mask with BRVLAN and TUNNEL joins (B58), the file mode with no ll_init_map and no selectors (B65, B66), accept_msg over xtcpnl.BrEventKind with NLMSG_TSTAMP through nlmon, and print_headers in each printer after its filters. The batch state bridge keeps is copied: the closed rth (B63), the banner (B62) and the -t counter every show zeroes (B64). source_monitor.go subscribes live or replays a capture's notifications. TestGobridgeMonitorCorpus replays all 44 brmonitor rows; the unit table has 31 rows; the fuzz found B20 reachable through monitor file (bridge 7.2.0 exits 139), recorded in the upstream docs. 8/8 mutants killed, coverage 82.6%. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…C, 25P, 25R) kernel-citation-audit flags "neighbour" not preceded by a kernel path. Comments and test descriptions only; the brmonitor rows are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
iproute2-bridge-monitor.md gains its HEAD check: at the mirror's main d7e038f99479 every B lead is present (monitor.c, the printers, ll_map.c and bridge.8 unchanged; the four libnetlink.c commits miss every lead), and at torvalds 007722b8211f every K note's code is unchanged. The summary's At HEAD column is filled. print-paths.md records that 1392041d fixes half of B3 and points to the new doc. gobridge.md gains the increment 25 section. The doc checklist passes and catches four mutated copies. Not submitted to netdev. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gobridge beside bridge 7.2.0 on the workbench, every brmonitor row, live rows side by side with both monitors checked idle in recvmsg before the trigger: stdout, stderr and rc identical on 44 of 44 in two batches, stamps masked. bridge matches its 25C corpus on 44 of 44, on the corpus's own boot (the shared VM was not rebooted). No new lead; B66 also seen with the ifindexes shifted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
prealloc flagged the monitor tests' record files and the brmonitor command list. A recs helper sizes the file once; cmds starts with its capacity. The generated rows are byte-identical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The only conflict is the gobridge-status.md ledger: both sides kept, increment 25's V110-V114 and DOC035, then main's V402 (6C fresh boots). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
randomizedcoder
added a commit
that referenced
this pull request
Dec 5, 2026
docs(upstream): the bridge monitor note's index row, and the DOC035 collision (PR #388's gap)
This was referenced Dec 5, 2026
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 25: gobridge now clones
bridge monitor, both live and withfile F. That finishes gobridge's read side; only writes are still refused.Commits
print_nlmsg_timestampmoves from goip intointernal/nlmonasTstampText;mkMonHelper, with a newxtcp2-nl-brmon-wsthat finds the monitor's socket by pid (a bare orallmonitor clears the 0x8 bit tc's check uses);nlcap-brmon-ws(13 rows);nlcap-tcmonstill passes unchanged.brmonitorcapture space, 44 rows: 18 live, 12 file and batch, 14 negatives. Captured on two boots.pkg/xtcpnl:BrEventKind.TestWsBrMonitordecodes all 307 corpus events with the existing parsers and rejects none.gobridge:monitor.goandsource_monitor.go. The batch state is copied from bridge:-tzeroed by shows, a banner that is never reset, and the socket monitor closes.upstream/iproute2-bridge-monitor.mdcompleted, with a HEAD check of both trees.gobridge-status.mdledger, and both sides are kept: V110–V114 and DOC035, then V402.Results
brmonitorrows replay byte for byte, with stamps masked.bridge7.2.0 were identical on 44 of 44 rows, in two batches. This was on the same boot as the corpus, not a second boot, because the workbench VM is shared.TestGobridgeMonitorUnit: 31 rows;FuzzGobridgeMonitorFileran twice for 60 s (90k and 44k executions);internal/gobridgecoverage 82.6%.docs/netlink/upstream/, nothing sent to netdev):state disabled) and K17.bridge monitor file Fsegfaults (rc 139) on a 36-byte RTM_NEWVLAN.d7e038f99479), every B lead is still present. At torvalds HEAD, every K note is unchanged.Gates (at 39a7241, the merge)
go test ./...: 113 packages pass.pkg/xtcpfailed onTestTCPDest_writeTimeout.That test is already flaky on main: it failed 3 of 20 runs (
-count=20) on a clean main checkout. It checks thedroppedcounter as soon as the first write error is counted, but withattempts = 2the drop is only counted after the second attempt, about 100 ms later. This branch doesn't touchpkg/xtcp, and the package passed on rerun.🤖 Generated with Claude Code