Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .golangci-comprehensive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ run:
- dest_file
- goip_write
- gotc_write
- gobridge_write
- treatment

formatters:
Expand Down
1 change: 1 addition & 0 deletions .golangci-quick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ run:
- dest_file
- goip_write
- gotc_write
- gobridge_write
- treatment

formatters:
Expand Down
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ run:
- dest_file
- goip_write
- gotc_write
- gobridge_write
- treatment

formatters:
Expand Down
2 changes: 1 addition & 1 deletion docs/netlink/events-export-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

- States are `not started`, `in progress`, `blocked`, `done` or `deferred`. There are no percentages.
- A task is `done` only when its gates have passed and the evidence is in the [ledger](#verification-ledger).
- Evidence IDs (`V###` for code and VM runs, `DOC###` for docs) are immutable and append-only. The next free ID is V405; the next free DOC is DOC039 (DOC038 is the gobridge monitor arc's 25B, renumbered from its landed DOC035 — a collision with the events plan's DOC035 — by the events export arc's index-row fix).
- Evidence IDs (`V###` for code and VM runs, `DOC###` for docs) are immutable and append-only. The next free ID is V405; the next free DOC is DOC040 (DOC039 is the gobridge write arc's 26B; DOC038 is the gobridge monitor arc's 25B, renumbered from its landed DOC035 — a collision with the events plan's DOC035 — by the events export arc's index-row fix).
- Task IDs (`EXM`, `EXP`, `EXD`, `EXC`, `EXU` with `-Tmm` suffixes) are never renumbered.

## Phase states
Expand Down
50 changes: 49 additions & 1 deletion docs/netlink/gobridge-status.md

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions docs/netlink/gobridge.md
Original file line number Diff line number Diff line change
Expand Up @@ -702,3 +702,45 @@ K10-K17), not submitted to netdev. The ledger rows in [gobridge-status.md](gobri
that every show zeroes (B64).
- **Crashes:** the crash bridge has on a crafted file (B20 through `monitor file`) is refused by name, as 6R's
are.

## Increment 26 — writes: `bridge link set` and `bridge mst set` (V115–V119, DOC039)

gobridge's first writes, built only with the `gobridge_write` tag: `bridge link set` (and `change`) and `bridge mst
set`, each one RTM_SETLINK for PF_BRIDGE, byte for byte with bridge 7.2.0. The default `gobridge` stays untagged
and refuses them by name, as it refuses every other write. Planned 2026-12-04 after increment 25, going bottom-up:
the port first, then 27 vlan (add/del/set, global set), 28 vni, 29 fdb, 30 mdb. Leads are in
[upstream/iproute2-bridge-write.md](upstream/iproute2-bridge-write.md) (B77-B90, K18-K28). Two kernel defects have
their own docs: [kernel-bridge-setport-partial-apply.md](upstream/kernel-bridge-setport-partial-apply.md) (K25)
and [kernel-bridge-learning-sync-ignored.md](upstream/kernel-bridge-learning-sync-ignored.md) (K27). None is
submitted to netdev. The ledger rows in [gobridge-status.md](gobridge-status.md) have the detail.

| task | what | ledger |
|---|---|---|
| 26X | the `gobridge_write` tag wired as `gotc_write` is; no-write-encoders over internal/gobridge; `send_write.go` (dry-run delivery); `LiveSource.Talk` refuses anything but a GET in every build | V115 |
| 26C | `ws/brlinkwrite`, 141 rows over five fixtures: 92 accepted writes with readbacks, 46 refusals, 3 `-force` batches; two batches on one boot | V116 |
| 26P | `pkg/xtcpnl/xtcpnl_bridge_write.go` (tagged); `TestWsBrLinkWrite` rebuilds all 118 captured SETLINKs and checks 91 against the kernel's readback | V117 |
| 26W | `link_write.go` and `mst_write.go`; the corpus replay, 77 unit rows, a fuzz, 8 mutants | V118 |
| 26B | the doc's HEAD check; K25 and K27 written up on their own; B64's extension line | DOC039 |
| 26L | gobridge next to `bridge` 7.2.0 on the workbench, every `brlinkwrite` row | V119 |

**The dry-run model** (gotc's, from increment 17):

- **Nothing is applied.** A replay source matches the request with bridge's, byte for byte (seq and pid aside),
and answers with the recorded ack, so a NAK prints as bridge prints it (`RTNETLINK answers: …`, or the extack)
and returns -1.
- **On the kernel socket,** the request goes to the file `GOBRIDGE_WRITE_OUT` names, truncated by the run's first
write. Without that variable, gobridge refuses with `ErrWriteNotApplied` (rc 1).
- **The socket never carries a write.** `LiveSource.Talk` refuses anything but an RTM_GET*, whatever the build.

**How the clone is put together:**

- **Words:** brlink_modify's strcmp, in its order. An unknown word is usage (B85); `dev` is checked after the loop
(B90).
- **Values are narrowed as the C narrows them,** through `pkg/cint`: `atoi` into `__s8` (mcast_router, B77), `__u32`
(cost, sent only when > 0, B78) and `__s16` (priority, B79), `strtol` into `__s8` (state, B80), `get_s32`
(mcast_max_groups, B83) and `get_u32` (backup_nhid).
- **parse_on_off's failure is `retCode(-EINVAL)`:** rc 234, and a `-force` batch carries on (B84).
- **The request:** `xtcpnl.BuildBrLinkWriteRequest` writes PROTINFO always, even empty (B82), and with NLA_F_NESTED.
It writes AF_SPEC only for a flag or a mode, and without NLA_F_NESTED. `hwmode` assigns the flags (B81).
- **mst set:** unknown words are ignored; the MSTI check reads the state (B86); the MSTI is a `__u16` (B87).
`mst s` is a set, because do_mst matches set before show (B88).
3 changes: 3 additions & 0 deletions docs/netlink/upstream/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ found by a capture, reproduced, fixed, tested, reviewed — and ready to send.
| [iproute2-tipc-print-paths.md](iproute2-tipc-print-paths.md) | `tipc -j link get broadcast` dies of SIGSEGV, `tipc -h node get identity` calls a NULL help, `parse_attrs` writes `tb[type]` unbounded; thirteen more, two more crashes | ≤ HEAD | no | the 93-row tipc ws corpus (pw-022, exit 139) | not yet; drafts |
| [iproute2-bridge-print-paths.md](iproute2-bridge-print-paths.md) | `bridge fdb show` cannot filter a port name, a dump stops at the first port, four NULL reads, filters that leak between batch lines, and inconsistent exits and JSON — B1-B57 and K1-K9 | ≤ HEAD | no | the bridge ws corpus (6C/V097, 6X-C/V101, 7C/V108) and the `gobridge` unit rows | not yet; drafts |
| [iproute2-bridge-monitor.md](iproute2-bridge-monitor.md) | `bridge monitor` joins groups its bare form never joins (fdb, mdb, vlan, vni — the plain command silently misses them), a word order that decides which tool printed a line, `-j` ignored in monitor mode, `file` mode that ignores its selectors, and statics that outlive their command — B58–B76 and K10–K17 | ≤ HEAD | no | the `ws/brmonitor` corpus (25C/V111) and the `gobridge` monitor clone (25R/V113) | not yet; drafts |
| [iproute2-bridge-write.md](iproute2-bridge-write.md) | `bridge link set` and `bridge mst set` narrow their numbers through `atoi`/`strtol` (an MSTI of 70000 is sent as 4464, `mcast_router abc` turns router mode off), always send an empty `IFLA_PROTINFO`, test the wrong pointer for an empty MSTI, let `hwmode` wipe `master`, and print four different device-lookup errors — B77–B90 and K18–K28 | ≤ HEAD | no | the `ws/brlinkwrite` corpus (26C/V116), the encoder oracle (26P/V117) and the `gobridge` write clone (26W/V118) | not yet; drafts |
| [kernel-bridge-setport-partial-apply.md](kernel-bridge-setport-partial-apply.md) | A bridge port setlink refused with ERANGE or EINVAL has already committed its port flags (`hairpin on cost 70000` is refused, yet hairpin is on) — K25 | kernel 7.3.1 observed; 7.4-rc4 and torvalds `28a23309c8e4` checked | no | `ws/brlinkwrite` ng-049 (26C/V116) | not yet; recorded only |
| [kernel-bridge-learning-sync-ignored.md](kernel-bridge-learning-sync-ignored.md) | A software bridge acks `IFLA_BRPORT_LEARNING_SYNC` on a port, changes nothing and never reports it — K27 | kernel 7.3.1 observed; 7.4-rc4 and torvalds `28a23309c8e4` checked | no | `ws/brlinkwrite` ec-011/ec-012, `TestWsBrLinkWrite` (26P/V117) | not yet; recorded only |
| [iproute2-tunnel-tuntap.md](iproute2-tunnel-tuntap.md) | `ip tunnel show` overflows the stack on a long name, `ip tuntap` double-fcloses its file, text inside `-j`, an uninitialized byte, filters that match the wrong tunnels — T1-T25 | 7.2.0, ≤ HEAD | no | the 217-row tunnel corpus (8C/V002) and the `tnlsys` sidecars | not yet; drafts |
| [iproute2-tc-qdisc-class.md](iproute2-tc-qdisc-class.md) | `tc qdisc show`'s `-g` walks a freed graph, a double free across batch lines, text inside `-j`, JSON keys that differ by path, filters that stick between commands — Q1-Q36 | 7.2.0, ≤ HEAD | Q14 only — `9dd1bec6b863` (2026-11-09, untagged) | the tc corpus (`ws/tcqdisc/` 142 rows, `ws/tcclass/` 82; 9C/V002), replayed byte for byte by `gotc` | not yet; drafts |
| [iproute2-tc-filter.md](iproute2-tc-filter.md) | Filter and chain JSON, overflowing preferences, sticky filters, handle parsers and exit statuses | 7.2.0; later status in note | see note | `ws/tcfilter/`, increment 10 | not yet; drafts |
Expand Down
4 changes: 4 additions & 0 deletions docs/netlink/upstream/iproute2-bridge-monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ These extend [B28, B29](iproute2-bridge-print-paths.md#b28-b29-batch-lines-inher
- **B64 (confirmed, ec-029):** `fdb show`, `link show`, `mdb show`, `vlan show` and `vni show` each set
`timestamp = 0`. `bridge -t -batch` with `fdb show` then `monitor file m.bin` prints no `print_timestamp` lines;
the one `Timestamp:` line is the file's own NLMSG_TSTAMP record.
- **Extended in increment 26:** `mst` is the one object that never zeroes it. `do_mst` (mst.c:244-263) has no
`timestamp = 0`, unlike `do_link` (link.c:691) and the others, so neither `mst show` nor `mst set` resets
`-t`: `bridge -t -batch` with an `mst` line then `monitor file m.bin` keeps the stamps. Source only, no row
(B88 in [iproute2-bridge-write.md](iproute2-bridge-write.md#b86-b88-mst-sets-checks-and-dispatch)).
- **B69 (confirmed, ec-027):** the show commands' filters are statics too, and the printers apply them in monitor
mode. After `fdb show dev d1`, `monitor file m.bin` prints the fdb events on d1 without `dev d1` (the filter
hides the column) and drops the delete on d2 altogether. Link, mdb, vlan and vni events are unaffected.
Expand Down
Loading