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
  •  
  •  
  •  
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 V407; 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).
- Evidence IDs (`V###` for code and VM runs, `DOC###` for docs) are immutable and append-only. The next free ID is V407; the next free DOC is DOC041 (DOC040 is the gobridge vlan write arc's 27B; 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
40 changes: 40 additions & 0 deletions docs/netlink/gobridge-status.md

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions docs/netlink/gobridge.md
Original file line number Diff line number Diff line change
Expand Up @@ -744,3 +744,59 @@ submitted to netdev. The ledger rows in [gobridge-status.md](gobridge-status.md)
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).

## Increment 27 — writes: `bridge vlan add`, `del`, `set` and `global set` (V120–V124, DOC040)

The next layer up from increment 26, again built only with `gobridge_write`:

- `bridge vlan add` and `del` (vlan_modify) send RTM_SETLINK or RTM_DELLINK with `IFLA_AF_SPEC`.
- `bridge vlan set` (vlan_option_set) and `bridge vlan global set` (vlan_global_option_set) send RTM_NEWVLAN, which
27X admitted to the write gate.

Each is byte for byte with bridge 7.2.0; the default `gobridge` refuses them by name. Leads are in
[upstream/iproute2-bridge-write.md](upstream/iproute2-bridge-write.md), increment 27 (B91–B106, K29–K44). Three
kernel defects have their own docs, none submitted to netdev:

- [kernel-bridge-dellink-drops-extack.md](upstream/kernel-bridge-dellink-drops-extack.md) (K29);
- [kernel-bridge-vlan-del-missing-acked.md](upstream/kernel-bridge-vlan-del-missing-acked.md) (K30);
- [kernel-bridge-vlan-interval-readback-overflow.md](upstream/kernel-bridge-vlan-interval-readback-overflow.md)
(K44).

The vlan paths' partial applies (K31, K34, K36, K40, K42) are added to
[kernel-bridge-setport-partial-apply.md](upstream/kernel-bridge-setport-partial-apply.md).

| task | what | ledger |
|---|---|---|
| 27X | RTM_NEWVLAN admitted (`br_vlan_msg` in `FamilyHdrLen`); vlan.go's three refusals dispatched to `vlanModify`, `vlanSet`, `vlanGlobalSet`; the doc's predicted leads | V120 |
| 27C | `ws/brvlanwrite`, 227 rows over nine fixtures: 121 accepted writes with readbacks, 106 refusals, 12 batches; two batches on one boot | V121 |
| 27P | `BuildBrVlanModifyRequest` and `BuildBrVlanOptsRequest` (tagged); `TestWsBrVlanWrite` rebuilds every captured write and checks every accepted one against the kernel's readback | V122 |
| 27W | `vlan_write.go`; the corpus replay (230 rows with B106's three), 100 unit rows, a fuzz, 8 mutants | V123 |
| 27B | the doc's HEAD check and extension lines; K29, K30, K44 on their own (written in 27C) | DOC040 |
| 27L | gobridge next to `bridge` 7.2.0 on the workbench, every `brvlanwrite` row | V124 |

**How the clone is put together:**

- **The dry run is increment 26's.** `deliverWrite` and `GOBRIDGE_WRITE_OUT` are unchanged. Every gobridge write
shares that one copy, so no shared package is needed yet (send_write.go's comment, corrected in 27X).
- **Words:**
- add and del take strcmp keywords. A prefix of `help` swallows the next word (B100), and anything else is
ignored.
- set does the same, with the device looked up as the loop reads `dev` (B89's fifth text).
- global set reads its 13 options from a table of attribute and width, with an exact `help`.
- **Values are narrowed as the C narrows them,** through `pkg/cint`:
- `vid` is `atoi` into a short, `-1` meaning "not given" (B91–B95).
- add keeps the range state across a repeated `vid` (B96), and global set keeps `vid_end` for the whole command
(B97).
- `state` is strtol into a u8 (B102), and every number goes through get_u8/u16/u32/u64 with base 0 and a sign
(B104, B105).
- **Errors:**
- parse_on_off's failure is `retCode(-EINVAL)` (rc 234; `-force` carries on), where `invarg` is `exitCode(255)`
and ends the batch (B103).
- add's checks run after the loop, in C's order; set's and global set's vid checks run in the loop.
- **The request:**
- `BuildBrVlanModifyRequest` writes AF_SPEC without NLA_F_NESTED and `IFLA_BRIDGE_FLAGS` only when non-zero. It
then writes VLAN_INFO, or TUNNEL_INFO in its place: flags dropped, one vid dropping the end id (B98).
- `BuildBrVlanOptsRequest` writes the ENTRY or GLOBAL_OPTIONS nest with NLA_F_NESTED and the options as an
ordered list, so repeats survive.
- `vlanOpts.add` keeps addattr_l's running length and bounds (1048; 1024 for global set's options). It drops an
option past the bound with C's message and sends the rest (B106).
7 changes: 5 additions & 2 deletions docs/netlink/upstream/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ 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 |
| [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. `bridge vlan add`/`del`/`set`/`global set` narrow `vid` into a `short` (70000 is 4464, 65535 the "missing" sentinel, 40000 passes the client), keep range state across repeated `vid` words, swallow the word after `help`, accept a sign in unsigned numbers, and drop an option past the request's bound with rc 0 — B91–B106 and K29–K44 | ≤ HEAD | no | the `ws/brlinkwrite` corpus (26C/V116), the encoder oracle (26P/V117) and the `gobridge` write clone (26W/V118); the `ws/brvlanwrite` corpus (27C/V121) and the `gobridge` vlan write clone (27W/V123) | 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; and the vlan option, global option and master-then-self paths do the same (K31, K34, K36, K40, K42) | kernel 7.3.1 observed; 7.4-rc4 and torvalds `28a23309c8e4` checked | no | `ws/brlinkwrite` ng-049 (26C/V116); `ws/brvlanwrite` ng-102–ng-106 (27C/V121) | 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 |
| [kernel-bridge-dellink-drops-extack.md](kernel-bridge-dellink-drops-extack.md) | A bridge VLAN delete passes a NULL extack, so `vlan del … vid 4095` is a bare EINVAL where the add says `Vlan id is invalid` — K29 | kernel 7.3.1 observed; 7.4-rc4 and torvalds `8e5ca834ee39` checked | no | `ws/brvlanwrite` ng-001/ng-002/ng-008/ng-009 (27C/V121) | not yet; recorded only |
| [kernel-bridge-vlan-del-missing-acked.md](kernel-bridge-vlan-del-missing-acked.md) | Deleting a VLAN a bridge port does not have is acked: `nbp_vlan_delete`'s ENOENT is dropped — K30 | kernel 7.3.1 observed; 7.4-rc4 and torvalds `8e5ca834ee39` checked | no | `ws/brvlanwrite` ec-024/ec-025/ec-119 (27C/V121) | not yet; recorded only |
| [kernel-bridge-vlan-interval-readback-overflow.md](kernel-bridge-vlan-interval-readback-overflow.md) | A per-VLAN multicast interval is stored unchecked and saturated, and `jiffies_to_clock_t` overflows on the way out, so 2^64-1 reads back as 1844674407370 — K44 | kernel 7.3.1 observed; 7.4-rc4 and torvalds `8e5ca834ee39` checked | no | `ws/brvlanwrite` ec-110 (27C/V121) | 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
9 changes: 9 additions & 0 deletions docs/netlink/upstream/iproute2-bridge-print-paths.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,11 @@ On a failed dump, `brlink_show`, `vlan_show`, `vlan_global_show` and `vni_show`
- `vid 70000` is accepted and matches nothing: header only (ec-025). `vid -1` likewise.
- `vid 0 vid 5` escapes the duplicate check, because the first value left `filter_vlan` at 0 (ec-026).

**Extended in increment 27:** the vlan writes parse `vid` the same way, into a `short`, so the write path narrows
where the show only mismatches: `bridge vlan add dev d1 vid 70000` prints `Invalid VLAN ID "4464"`, `vid 65536`
sends vid 0, `vid abc` sends 0, and `vid 65535` is the "missing" sentinel (B91-B95; `ws/brvlanwrite` ng-017,
ng-004, ng-006, ng-018; [iproute2-bridge-write.md](iproute2-bridge-write.md), increment 27).

Other commands parse VLAN IDs with `get_u16` and reject these values.

## B6. Headers are printed before the dump
Expand Down Expand Up @@ -289,6 +294,10 @@ The kernel always sends these today, so all three are latent. `gobridge` exits 1

`do_vlan` matches its sub-commands by prefix (`matches`), so `bridge vlan sh` works. `vlan_global` (`vlan.c:1325-1338`) uses `strcmp`, so `bridge vlan global sh` prints the vlan usage and exits 255 (ng-009). `do_vni` uses `strcmp` throughout (`bridge vni sh`, ng-008), so prefixes work for some objects and not others.

**Extended in increment 27:** `vlan_global` takes `set` by `strcmp` too, so `bridge vlan global se dev br0 vid 10`
prints the vlan usage, rc 255, where `bridge vlan se` is `vlan set` (`ws/brvlanwrite` ng-098, ec-081;
[iproute2-bridge-write.md](iproute2-bridge-write.md), increment 27).

## B22. `-s vlan tunnelshow` prints VLAN statistics

`vlan_show` (`vlan.c:1140-1190`) tests `show_details && subject == VLAN_SHOW_VLAN` for the `-d` path, and otherwise only `show_stats`. Under `-s`, `tunnelshow` takes the statistics path and prints the per-VLAN counters with the "port vlan-id" header, not tunnels (ec-027, pw-027).
Expand Down
Loading