diff --git a/docs/netlink/gobridge-status.md b/docs/netlink/gobridge-status.md index 6687d608a..791937e35 100644 --- a/docs/netlink/gobridge-status.md +++ b/docs/netlink/gobridge-status.md @@ -71,6 +71,24 @@ commands plus 6 `-netns` and batch forms ran under both tools. 169 of 174 were identical byte for byte; the other 5 (mdb `-s`) differ only in a temp entry's running timer, read 10 ms apart, and are identical with the timers masked (V109). +- **Increment 25, `bridge monitor`:** in progress on `gobridge/monitor`. 25X is done: + `nlmon.TstampText` (print_nlmsg_timestamp) moves out of goip; the capture helper + `xtcp2-nl-tcmon` becomes a generator, and `xtcp2-nl-brmon-ws` finds the monitor's socket + by its inode; [upstream/iproute2-bridge-monitor.md](upstream/iproute2-bridge-monitor.md) + holds the sweep's leads B58-B75 and K10-K16, all predicted (V110). + 25C is done: `ws/brmonitor`, 44 rows (18 live under `xtcp2-nl-brmon-ws`, 12 file and batch + rows over the live rows' own notifications, 14 negatives), two batches on one boot identical + with stamps masked and batch 1's live rows identical across boots. 20 leads confirmed, + B62 and K11 corrected, B71 dropped, B76 and K17 new (V111). + 25P is done: `xtcpnl.BrEventKind` names accept_msg's objects, and `TestWsBrMonitor` + decodes all 307 bridge events of the corpus, the record files included (V112). + 25R is done: gobridge clones `bridge monitor`, live and file, and replays all 44 + `brmonitor` rows; only the writes are still refused (V113). + 25B is done: the HEAD check finds every B lead still present and every K note's kernel code + unchanged; the doc's checklist passes (DOC035). + 25L is done: on the workbench, gobridge beside `bridge` 7.2.0 on every `brmonitor` row, live + rows side by side, is identical on 44 of 44 in two batches, and `bridge` matches its corpus on + 44 of 44 (V114). ## Contents @@ -96,6 +114,7 @@ | 6 — bridge | wsreplay → capture → parser → tests → `gobridge` clone → bug hunt | done | V096, DOC031, V097, V098, V099, DOC032, V100, V402 | | 6X — bridge, the rest | batch, force, netns, family, router ports: capture → parser → clone → bug hunt → live | done | V101, V102, V103, DOC033, V104 | | 7 — fdb and mdb | readbacks → capture → parser → clone → bug hunt → live | done | V105, V106, V107, V108, DOC034, V109 | +| 25 — monitor | groundwork → capture → parser → clone → bug hunt → live | in progress | V110 | ## Task checklist @@ -118,6 +137,12 @@ | [x] | 7R | gobridge `fdb.go`, `mdb.go`; readbacks replayed | done | V107 | | [x] | 7B | fdb.c/mdb.c against C1-C16; B38-B57, K4-K9 recorded | done | DOC034 | | [x] | 7L | live diff over the fdb/mdb fixtures | done | V109 | +| [x] | 25X | `nlmon.TstampText`; `xtcp2-nl-brmon-ws` and its check; the monitor doc's predicted leads | done | V110 | +| [x] | 25C | `matrix_brmonitor.go`, live, offline, negative and batch rows, two batches | done | V111 | +| [x] | 25P | `BrEventKind`; `TestWsBrMonitor` decodes every notification | done | V112 | +| [x] | 25R | gobridge `monitor.go`, `source_monitor.go`; corpus, unit, fuzz, mutants | done | V113 | +| [x] | 25B | B58+ and K10+ completed, HEAD checked | done | DOC035 | +| [x] | 25L | live diff of every `brmonitor` row | done | V114 | ## Verification ledger @@ -141,6 +166,12 @@ | V108 | 7C | **Spaces:** `tools/nlcapgen/matrix_bridgefdb.go` and `matrix_bridgemdb.go`, families `bridgefdb` and `bridgemdb` (rows `nix/microvms/workbench/bridge{fdb,mdb}.rows.jsonl`, corpus `pkg/xtcpnl/testdata/7_3_1/ws/bridge{fdb,mdb}/`, 3.5 MB). Their own fixed-MAC fixtures, not the 7_3_0 `fdbBrSetup`/`mdbBrSetup`, whose MACs are random. **fdb, 94 rows:** 37 commands plain and `-j` plus 20 negatives over `fdb` (br0, d1 and d2 on vid 10; 0a:01 static vid 10, 0a:02 permanent, 0a:03 dynamic, 0a:04 sticky, 0a:05 extern_learn, 0a:06 activity_notify, 0a:07 `self` on d1) and `fdbvx` (vx0 with `dst port vni src_vni via` and a `nexthop ... fdb` group used by `nhid 1`): `show` bare, `-s`, `-d`, `-o`, `br`, `brport`, `dev`, `br`+`dev`, `vlan`, every `state` form (`permanent`, `static`, `reachable`, `all`, `0`, `s`), `dynamic`, `dev d1 dev d2`, `vlan 0 vlan 10`, `bogus`, `sh`; `get` by `br`+`vlan`, by `dev`, `g`, `to`, `-s -d`, `dynamic`; and five batches (dev, br, state ORed, get's `dynamic` reaching show, `vlan` reaching get). **mdb, 74 rows:** 29 commands plain and `-j` plus 16 negatives over `mdb` (br0 snooping IGMPv3/MLDv2, IPv6 off on br0; 239.1.1.1 vid 10, ff0e::1 temp, *,G 239.2.2.2 include with two sources and proto static, S,G 232.1.1.1, an L2 group, a host join, d1 a permanent router port) and `mdbvx` (vx0 with three remote entries): `show` with `-d`, `-s`, `-d -s`, `-o -d`, `-o -d -s`, `dev br0`, `dev d1`, `vid 10`, `vid abc`, `bogus`, `help`, `sh`; `get` of each group kind; three batches. **Two batches** on one workbench boot (kernel 7.3.1, iproute2 7.2.0; the VM is shared, so not rebooted): fdb 94/94 and 94/94, stdout, stderr, rc and `b.txt` identical; mdb 74/74 and 74/74, identical but for the running timer of the temp entries in four `-s` rows (ec-005, ec-006, ec-008, pw-005), the named allow-list. **Found while capturing** (each fixed in the space, its row kept): (1) the kernel refuses `permanent` for a host join, so the first mdb batch lost 56 rows to a failed pre step; the host join is `temp`. (2) An entry added without a vid on a VLAN-filtering bridge is installed on every VLAN of the port (1 and 10), and `mdb get` without `vid` looks up vid 0: ENOENT. The gets name `vid 10`, and ng-008 keeps the vid-less get as a negative. (3) A VXLAN mdb entry's `src_vni` is part of its key, yet the dump of a device that is not `external` never prints it: `mdb get ... grp 239.1.1.2` misses (ng-014, "vxlan: MDB entry not found") until `src_vni 300` is given (ec-025). (4) br0's own MLD report put an `ff02::6a` host join in the dump at a random moment; IPv6 is off on br0. The errno of ng-014 is spelled `ENOTSUP`, the corpus's name for 95. **Live, confirmed:** F2 (dev, br and state statics carry into the next batch line; a second `vlan`/`vid` line is a duparg, ng-020, mdb ng-016), F3 (`fdb show` after `dev d1` drops the dev column), F4 (`dynamic` keeps static and extern_learn entries), F5 (`state s` is static), F7 (extern_learn's REACHABLE state prints as a trailing space), F13 (`vlan 65535` is not sent, so the get misses; `vlan 70000` is sent as 4464, "invalid vlan id"; `vni 16777216` is "invalid VNI" plus an empty line), M1 (`mdb show bogus`, `help`), M2 (`mdb g` unknown), M3 (a stale `vid 1` hides get's vid 10 answer, ec-028), M5 (the L2 group), K4 (`fdb get br br0 dev d1`, "Master and device are mutually exclusive"). **Tests:** `TestBridgefdbSpace` and `TestBridgemdbSpace` (counts; route proto and bridge/vxlan modules; every read row paired with its `-j` twin; no write captured; batch rows read `b.txt`; generation deterministic; the nexthop before `nhid 1`; 25 and 19 rows pinning each row's kind, rc, refusal, errno, extack and pre count). `TestWsCorpusRows` passes all 168. `pkg/xtcpnl/xtcpnl_ws_bridgefdbmdb_test.go`: O3 `TestWsBridgeFdbMdbRequests` rebuilds all 69 fdb dumps, 22 fdb gets, 94 mdb dumps and 22 mdb gets with the 7S builders, byte for byte, seq and pid aside; O4 `TestWsBridgeFdbMdbJSON` checks the 37 fdb and 29 mdb `-j` rows with rc 0: each of the 643 and 228 objects is an entry a reply carried (by MAC or group), and each of the 4 router keys a bridge whose reply had `MDBA_ROUTER`. `TestGobridgeCorpus` replays all 344 `ws/bridge*` rows (113, 63, 94, 74) byte for byte with every request asked for, 7R's `mdbParseGrp` fix included (ng-011); coverage 83.2%. Gates: `go test ./...`, vet, gofmt, `lint-baseline`, `netlink-audit`, `kernel-citation-audit`. **Amendment (2026-12-04):** the 7C gate's "if the shared VM is free, two fresh-boot batches for both 6C and 7C" is met — both fresh boots ran `bridgefdb` and `bridgemdb` too, 94/94 and 74/74 each, the diffs the same timer rows this row names (plus their `-j -s` and `-s -o` variants, pw-006/pw-008) — see V402. | | DOC034 | 7B | **Doc:** [upstream/iproute2-bridge-print-paths.md](upstream/iproute2-bridge-print-paths.md) gains a section "Increment 7: fdb and mdb", still "Not submitted to netdev". The plan's 25 leads (F1-F14, M1-M11) were read against `bridge/fdb.c`, `bridge/mdb.c` and the `lib/` helpers at `v7.2.0`, and against the kernel (v7.4-rc4). A lead-to-B table maps the lead names that gobridge's unit rows and overread refusals use. **Recorded:** B38 (`fdb show dev d1 dev d2` silently shows d2; mdb's `dev` has a duparg), B39 (fdb's five and mdb's two filter statics carry between batch lines; new: a show's `vlan`/`vid` hides a later get's answer, rc 0, fdb ec-037 and mdb ec-028), B40 (`dynamic` keeps NOARP entries), B41 (`state s`, `state 0`, `state all`), B42 (`viaIfIndex`/`viaIf`; the s32 netnsid as `%d` and unsigned), B43 (REACHABLE prints `""` and a trailing space), B44 (fdb reads unchecked; cacheinfo `%d`), B45 (`-o` ignored by fdb and mdb's `-s` router lines), B46 (fdb dump error exit 1, `[` open), B47 (`fdb get`: "invalid VNI\n" plus invarg's newline, vlan atoi into a short, duparg2 before NEXT_ARG names the keyword, a dead `dev` branch, `to` named for a word never typed), B48 ("An error :-)"), B49 (unknown words in `mdb show`, `mdb get`, `fdb show`), B50 (`mdb g` vs `fdb g`), B51 (a failed mdb dump under `-j` trips `jsonw_destroy`'s assert, SIGABRT), B52 (an L2 group's `src`: `(null)`, a bare JSON key; the object left open on `!addr`), B53 (mdb casts unchecked), B54 (router type 0 prints "permanent"), B55 (`mdb get vid` atoi into a short; `src_vni` without a 24-bit check, truncated by `addattr32`), B56 (two mdb JSON shapes; router ports keyed by bridge name), B57 (`ll_addr_a2n` at 7.2.0: `bogus` and seven parts silent, a message naming one part). Kernel: K4 (`fdb get br dev` "mutually exclusive" though the usage offers both), K5 (bridge vs vxlan mdb dump types), K6 (strict mdb dump rejects an ifindex), K7 (a vxlan `src_vni` is kept in the key, never dumped, and needed by get), K8 (host joins refuse flags), K9 (a vid-less get misses entries installed per VLAN). M11 (`brifname` in `ll_index_to_name`'s static buffer) is dropped: it needs two uncached indexes. The assert abort is C6 with C12, so no new class. **Newest code:** `git log v7.2.0..87cb3f41 -- bridge/` is empty, and the GitHub mirror's newest `fdb.c`/`mdb.c` commit, `b468824a`, is in `v7.2.0`. `lib/json_writer.c`'s `c4c9a7fa` keeps the assert (line 122). The `libnetlink.c` commits since don't touch error printing. `ll_addr.c`'s `5faf18f6` fixes B57 at HEAD. Line numbers were re-read from `git show v7.2.0:bridge/{fdb,mdb}.c`, and each cited row's cmd, rc and output from the corpus. Gates: `kernel-citation-audit`. | | V109 | 7L | **Live diff:** on the running workbench VM (kernel 7.3.1, iproute2 7.2.0; no reboot, the VM being shared and idle), the nix-built `gobridge` (`/nix/store/wf30i2nr…-gobridge-0.2.1`, built from `59c54f599`) beside `bridge`, as root over the workbench's ssh key. The script is generated from the corpus: each distinct 7C fixture (the `pre` steps of `cmd.json`) is set up in its own named namespace (`gb7f0`-`gb7f4`: empty, `fdb`, `fdbvx`, `mdb`, `mdbvx`), and every one of the 168 `ws/bridgefdb` and `ws/bridgemdb` commands runs there under both tools, batch rows with their `b.txt`. To those, 6 forms from the root namespace: `-netns X fdb show`, `-n X -j fdb show br br0`, `-n X -d mdb show`, `-n X -j -d mdb show`, `-n X -j mdb get dev vx0 grp 239.1.1.2 src_vni 300`, and a `-n X -batch` mixing `fdb show dev d1`, `fdb get` and `mdb show`. stdout, stderr and rc were compared. **Result:** 169 of 174 identical. The other 5 (mdb ec-006, ec-008, pw-005, pw-006, pw-008, all `-s`) differ only in the running timer of the temp entries (`257.04` against `257.03`), read about 10 ms apart; a rerun of the six mdb `-s` rows with `[0-9]+.[0-9]{2}` masked was 6 of 6 identical. This is the same allow-list as 7C's two batches. No divergence, so no fix and no new unit row. The namespaces and work directory are removed after the run. | +| V110 | 25X | **nlmon:** `internal/nlmon` gains `NlmsgTstampCst` and `TstampText`, lib/utils.c's `print_nlmsg_timestamp` (asctime of the record's u32 seconds, then its u32 microseconds as `%lu`), moved from goip's `obj_monitor.go`, which now calls it; gobridge's monitor (25R) will too. `TestNlmonTstampText` 9 rows (positive 2: seconds and microseconds, a longer body reading its first eight bytes; negative 2: an empty and a one-byte body reading as zeros past the end; boundary 3: the epoch, 2^31 seconds, the largest u32 seconds in 2106; corner 2: 999999999 and 4294967295 microseconds printed whole, as C's `long` does). goip's monitor rows (`TestMonitorAccept`'s two NLMSG_TSTAMP rows among them) pass unchanged. **Capture helper:** `nix/microvms/netlink-capture.nix`'s `xtcp2-nl-tcmon` body is now `mkMonHelper`, parameterized by the tool, its override variable and the socket test; tc's instance keeps the RTNLGRP_TC bit 0x8 test. The new `xtcp2-nl-brmon-ws` (`NLCAP_BRIDGE`) finds `bridge monitor`'s socket as the NETLINK_ROUTE row whose Inode one of the monitor's `/proc//fd` links names, because a bare or `all` monitor binds ~RTMGRP_TC (bit 0x8 clear) and a `vlan` or `vni` one binds no group, joining 33 or 35 by setsockopt. Ready is still Dump 0, Rmem 0 and a thread in recvmsg; the 10 s per ERE, SIGTERM and a monitor's own exit status passed on are shared. `xtcp2-nl-brmon` (the BIRD captures' VLAN canary) is unchanged. **Checks:** `nlcap-tcmon` passes its 14 rows on the generated helper. The new `nix/checks/nlcap-brmon-ws.nix`, 13 rows (positive 2: a vlan monitor bound to no group, a ~RTMGRP_TC monitor with two events; negative 5: a dump that never ends, a host socket on bit 0x8 that is not the monitor's, a monitor that never subscribes, a failing trigger, an event that never comes; boundary 3: Rmem 320 queued, a monitor ending with rc 2, with and without an ERE; corner 3: blocked in another syscall, a refusal's rc 255 passed on, the usage), passes three builds in a row. Its first build failed one row on the fake's own `wc: write error: Broken pipe` when SIGTERM landed mid-substitution; the fake now discards wc's stderr. **Upstream:** [upstream/iproute2-bridge-monitor.md](upstream/iproute2-bridge-monitor.md) is created, "Not submitted to netdev", with B58-B75 and K10-K16 from the plan's sweep, each predicted until a 25C row confirms, corrects or drops it. **Bugs found:** none in this task; C's `print_nlmsg_timestamp` and goip's copy agree on every row above. Gates: `go test ./internal/nlmon/ ./internal/goip/`, `nix build .#checks.x86_64-linux.nlcap-tcmon .#checks.x86_64-linux.nlcap-brmon-ws`. | +| V111 | 25C | **Space:** `tools/nlcapgen/matrix_brmonitor.go`, `brmonitor`, 44 rows in `nix/microvms/workbench/brmonitor.rows.jsonl`, outside gobridge's `ws/bridge*` glob. 18 live rows run `bridge monitor` under `xtcp2-nl-brmon-ws` over five fixtures (br0 with d1 and d2 on vid 10, the same with per-VLAN snooping, br0 snooping with IPv6 off, vx0 over d5, the VNI-filtering vx1); each fixture and each trigger's work ends with a 1.5 s settle for the link watcher, then one marker event (mk0, 0f:ff, 239.9.9.9, vid 3999, vni 999999) that the row's ERE waits for. They cover each selector with a NEW and a DEL, two selectors, bare, `all`, `all link`, `link all`, `v`, `fd`, a plain dummy's MTU and down, `-t`, `-j`, `-d` and `-s`. 12 file and batch rows read `m.bin`, 19 records cut from batch 1's own notifications (every NEW and DEL of link, neigh, mdb, vlan and tunnel, an AF_UNSPEC link, an AF_INET neighbour, a TSTAMP, an RTM_NEWROUTE), plain, `link`, `all`, `-t`, `-j`, `-d -s`, one record and empty, and four batches (a show's filter, `all`'s banner, a show zeroing `-t`, file then file). 14 negatives: help, `h`, `f`, `fdbx`, `a`, `vn`, a bare `file`, no such file, a truncated and a malformed record, an ifindex the host lacks (rc 0, ENODEV ignored), and three batches (a show after monitor, the banner before a show, `-force` with a missing file). **Captures:** workbench guest 7.3.1, iproute2 7.2.0. Batch 1 (26 rows, live and argument rows only) on one boot; batches 4 and 5 (44 rows) on a second boot, identical with `Timestamp: … usec` masked, and batch 1's 26 rows identical to batch 4's across the boots. The corpus is batch 5. Two earlier full batches were discarded: one lost its VM mid-run (the guest was restarted at 23:58 by another workbench user, so 22 rows failed NS_FAIL/PRE_FAIL), and one ran with two record bodies cut to 200 bytes by my extraction (bridge printed `!!!Deficit 140, rta_len=344` on the port record), now replaced by the full bodies and guarded by the test below. Two rows' expectation was corrected after the capture, not their observations: the B63 batches are ack-then-fail (rc 1, every request on the wire acknowledged; the EBADF send never leaves the process), as bridgex's B30 rows are. **Test:** `TestBrMonitorSpace` (positive 11, negative 14, boundary 2, corner 17 cases, one per row: kind, rc, refused-by, mode, ERE count), plus: only live rows run the helper and no negative does; no `-netns`, `dev lo`, host device or sysfs; every selector's NEW and DEL among the triggers; each record file written by a row, its record count (19, 1), each record's attributes ending at its body's end, every NEW/DEL type, TSTAMP and RTM_NEWROUTE present; two generations byte-identical. **Corpus checks:** `TestWsCorpusRows` accepts all 44 rows; 25R's `TestGobridgeMonitorCorpus` replays them. **Bugs found:** in [upstream/iproute2-bridge-monitor.md](upstream/iproute2-bridge-monitor.md), 20 leads confirmed with their rows; B62 corrected (a show after `monitor … all` fails on B63's EBADF before printing, so only a later `monitor` line shows the banner, ec-028, ng-013); K11 corrected (a port add is two AF_UNSPEC and three AF_BRIDGE RTM_NEWLINKs for the port, two byte-identical, plus br0's); B71 dropped (unreachable while B61 holds); B68 and B74 source only; new **B76** (an RTM_DELVLAN entry has no STATE, and vlan.c prints `state disabled` from its default 0, ec-005, ec-019) and **K17** (a vlan add on a port notifies the port's local fdb entry in that vid, br_vlan.c:364, ec-008). [upstream/iproute2-bridge-print-paths.md](upstream/iproute2-bridge-print-paths.md) gains "Extended in increment 25" lines on B28/B29 (B69, B62) and B30 (B63). Guest left with no namespaces and no core files. Gates: `go test ./tools/nlcapgen/ ./internal/gobridge/ ./pkg/xtcpnl/`. | +| V112 | 25P | **Decoder:** `pkg/xtcpnl/xtcpnl_br_event.go`, `BrEventKind(typ) (BrObj, isDel)` for the NEW and DEL types of link, neigh, mdb, vlan and tunnel, plus NLMSG_TSTAMP (15, iproute2's `include/libnetlink.h`, not a kernel type), each value cited to `include/uapi/linux/rtnetlink.h`. Every GET and SET type is none, as accept_msg has no arm for them. `IsRtnetlinkEventType` is unchanged (a change from the plan): its contract is the set `ParseRtnetlinkEvent` decodes, which linkmonitor's rdmanative source filters on through `IsRtnetlinkNotification`, and MDB, VLAN and TUNNEL have no arm there. **Tests:** `TestBrEventKind` (positive 10: each NEW and DEL; negative 5: RTM_NEWROUTE, NEWADDR, NEWQDISC, NLMSG_DONE, NLMSG_ERROR; boundary 12: each object's GET, the type below each NEW, 14, 0xffff; corner 2: NLMSG_TSTAMP is its own kind, type 0). `TestWsBrMonitor` reads all 44 rows' pcaps (bridge events with no REQUEST or MULTI flag) and the ec rows' `m.bin` records, and decodes each with the existing parsers: `ParseBridgeLink` for AF_BRIDGE, `ParseNewLink` otherwise, `ParseNeigh`, `ParseMdbDumpRouters`, `ParseBrVlan`, `ParseTunnelMsg`, and a TSTAMP must be 8 bytes. Events seen by kind (NEW/DEL): link 93/12, neigh 53/12, mdb 36/11, vlan 43/11, tunnel 15/11, tstamp 10; none rejected. Its 11 table rows: positive 5 (all five objects' NEW and DEL decode; K12, one RTM_NEWVLAN with vid 30 and range 32; K13, one RTM_NEWTUNNEL per VNI 600-602; K17, the port's local fdb entry before the RTM_NEWLINK; K15, the AF_INET neighbour arrives and decodes), negative 3 (K16, no RTM_DELNEIGH on an fdb replace; K14, the router port has no timer and no type; B76, the RTM_DELVLAN entry has no STATE), boundary 1 (the empty and one-record files), corner 2 (K11's two AF_UNSPEC then three AF_BRIDGE messages; the event file's 19 records, every NEW/DEL type, a TSTAMP and an RTM_NEWROUTE). **Benchmarks:** `BenchmarkWsBrMonitor` 307 events, about 1.0 µs and 2.4 allocations per event, 224 MB/s; `BenchmarkBrEventKind` about 10 ns for six types, no allocation. The benchmark first read the ng rows' truncated files too and failed (`record of 84 bytes in 76`); it now takes only the ec rows' files, as the test does. **Bugs found:** none rejected by the decoders. One detail added to K11 in [upstream/iproute2-bridge-monitor.md](upstream/iproute2-bridge-monitor.md): the first AF_BRIDGE message differs from the other two only in `IFLA_BRPORT_FORWARD_DELAY_TIMER`, 0 and then 1500. Gates: `go test ./pkg/xtcpnl/`, `go vet`, `gofmt -s`, netlink-audit and no-write-encoders at `5a55cd098`. kernel-citation-audit failed there on five "neighbour" spellings, three from 25C's `matrix_brmonitor*.go` (the audit was not run in 25C) and two from this task's test; `2cfd0d936` changes them to US spelling (comments and descriptions only, rows unchanged) and the audit passes at that commit. | +| V113 | 25R | **Code:** `internal/gobridge/monitor.go` is bridge/monitor.c. `doMonitor` first closes the socket main or batch opened (B63: `closeRth` swaps in a source whose every send is EBADF, and a later dump prints `Cannot send dump request: Bad file descriptor` and exits 1). `monitorArgs` is do_monitor's loop in its order: file, link, fdb, mdb and vlan by prefix, vni and all exactly, help by prefix (B59). A selector zeroes the mask, `all` restores ~RTMGRP_TC and sets vlan, vni and the banner, so the last of them wins (B60); the usage exits -1 and hides `file`'s argument (B72). `monitorFile` is fopen (`Cannot fopen: `, exit -1) then `nlmon.ReadFile` with every record handed to acceptMsg and no ll_init_map, so a name the cache lacks is an RTM_GETLINK on the main source (B66) and the selectors are ignored (B65). `monitorLive` is rtnl_open on the mask (exit 1), the BRVLAN and TUNNEL joins (`Failed to add bridge vlan group to list` or `Failed to add bridge vni group to list`, exit 1), ll_init_map on the monitor's socket, then `Listen`, flushing after each message. `acceptMsg` dispatches on `xtcpnl.BrEventKind` to `printLinkinfo`, `printFdb`, the new `printMdbMon` (one parse, the header, one "Deleted ", the entries then the router ports), `printVlanRtm(m, true, false)` and `printVnifilterRtm`; NLMSG_TSTAMP prints `nlmon.TstampText`, anything else is dropped (B73). `printHeaders` (the `-t` stamp, then the label once `prefixBanner` is set) is called by each printer after its filters (B62, B64, B69, B75); `-j` prints text, as no JSON object is opened (B61); `printVlanRtm`'s monitor flag resets the current port without closing it (B70). **Runner state:** `timestamp` is a counter that `-t` raises and every show zeroes (B64), `prefixBanner` is never reset (B62), `now` is `nlmon.NowFunc("GOBRIDGE_NOW")`, and `mainSrc` keeps main's source for ll_link_get once rth is closed. `out.flush` is rtnl_listen's fflush. **Source:** `source_monitor.go` has a live `Subscribe` (rtnl_open's buffers, extended acks, `NETLINK_ADD_MEMBERSHIP` for groups past 32) and a replay one that plays a capture's notifications and answers the monitor's own dump from it; `ReplaySource` keeps its capture path. `imports_test.go` allows `internal/nlmon`. The package doc, gobridge.md and `errNotImplemented` drop monitor. **Tests:** `TestGobridgeMonitorCorpus` replays all 44 rows (18 live through the replay `Subscribe`, each first checked to have its trigger after the dump's NLMSG_DONE; the rest as they ran, in their own directory), stdout, stderr and rc equal with stamps masked, with `GOBRIDGE_NOW` fixed and `time.Local` set to UTC for the TSTAMP's ctime, the counts (44, 18) pinned. `TestGobridgeMonitorUnit` 31 rows over a fake subscription: positive 8 (a bare monitor's NEW and DEL of each object, `all`'s banners, the masks and joins of `link`, `vlan`, `fdb mdb vni`, `all link`, `link all`, a file of every object), negative 11 (`f`, `a`, `vn`, `fdbx`, `help`, `h`, a bare `file`, a missing file, the socket failing to open, BRVLAN or TUNNEL failing to join), boundary 4 (an empty file, one record, a record cut short, a length under the header's), corner 8 (B65, B61, B75, B67 with B73, B69, B62, B63, B64). **Fuzz:** `FuzzGobridgeMonitorFile` (file bytes and a selector index), 60 s twice under `systemd-run --user --scope -p MemoryMax=6G` with `-timeout 300s`: 90,345 and 44,340 executions, no failure. The rate dropped to 0/s for stretches while the host's load average was 87; the 105 cached inputs each run in at most 0.32 s, so no input hangs. Its seed `8ef34ef20cf93c8e` is the B20 crash below; the oracle accepts rc 0, 1, 2, 255, 134 and 139. **Mutants:** 8 of 8 killed, each under the memory cap: a bare monitor joining BRVLAN, `f` as fdb, the banner reset per line, a show not zeroing `-t`, file mode honouring the selectors, AF_UNSPEC links dropped, the vlan monitor flag ignored, the stamp printed before the filters. **Coverage:** `internal/gobridge` 82.6%; the live socket's methods are 0%, as gotc's are. **Bugs found:** B20 extended: `bridge monitor file F` reaches print_vlan_rtm's NULL read from a 36-byte crafted RTM_NEWVLAN with no `ENTRY_INFO`; the fuzz found it, and nixpkgs' `bridge` 7.2.0 exits 139 on it with no output. Recorded in [upstream/iproute2-bridge-print-paths.md](upstream/iproute2-bridge-print-paths.md) (an "Extended in increment 25" line on B20) and [upstream/iproute2-bridge-monitor.md](upstream/iproute2-bridge-monitor.md) (B65's section). No corpus mismatch turned out to be bridge's. Gates: `go test ./internal/gobridge/ ./internal/nlmon/ ./internal/goip/ ./internal/gotc/ ./pkg/xtcpnl/ ./tools/nlcapgen/`, `go vet`, `gofmt -s`, `CGO_ENABLED=0 go build ./...`, `nix build .#gobridge`. | +| DOC035 | 25B | **Doc:** [upstream/iproute2-bridge-monitor.md](upstream/iproute2-bridge-monitor.md), still "Not submitted to netdev", is completed. A new "HEAD check" section covers both trees. **iproute2:** the mirror's `main` is `d7e038f99479` (2026-12-02), 98 commits past v7.2.0. `bridge/monitor.c`, `link.c`, `fdb.c`, `mdb.c`, `vlan.c`, `lib/ll_map.c` and `man/man8/bridge.8` are byte-identical. In `lib/utils.c`, the print_timestamp functions are unchanged. `include/libnetlink.h` changes only in an unrelated helper and a cast. Each of `lib/libnetlink.c`'s four commits was checked against every lead: `255cac0a` (connect), `9a5e7be5` (sequence counter), `9bfcf248` (non-kernel senders dropped) and `c6d58ffb` (rtnl_listen's malformed message becomes `!!!Remnant of size N`, still exit 1; that path is live only and no row reaches it). `rtnl_close` still sets fd -1. Every B lead is present; B71 stays dropped. The one `bridge/` commit, `1392041d`, fixes vni.c's "Dump ternminated". That is half of B3, so print-paths.md's B3 and its "Still present" section now say so; `mst.c`'s "Cannon send" remains. **Linux:** torvalds `master` is `007722b8211f` (2026-12-03). Since v7.4-rc4, `net/bridge/` has `da4a53461d46` (br_mdb.c source-list rollback on a failed add or replace; K14's rows are successful operations) and `75dc1bad7897` (netfilter). `vxlan_vnifilter.c` and the two uapi headers have no commits. Every K note is unchanged. **Summary:** the "At HEAD" column is filled: 18 present, B71 —, 8 unchanged. The status block now covers 25P and 25R. [upstream/iproute2-bridge-print-paths.md](upstream/iproute2-bridge-print-paths.md) points to the new doc from its contents and its reachability list. Its extension lines are on B20 (25R) and B28/B29 and B30 (25C). **Checklist** (`doc035chk.py`, grep over both docs), 12 checks, all passing. Positive 1: every B58-B76 and K10-K17 has a summary row and an entry. Negative 3: each confirmed, corrected or new lead names an ec or ng row; no row is outside the range; every row has its At HEAD answer. Boundary 3: B and K are contiguous; the dropped lead gives a reason. Corner 5: B20, B28, B29 and B30 each have their "Extended in increment 25" line, and print-paths points to the new doc. Four mutated copies of the doc (a removed row, a row with no pinning row, a dropped lead without a reason, an unfilled At HEAD) each fail it. **Docs:** [gobridge.md](gobridge.md) gains "Increment 25": the task table and how the clone is put together. **Bug-class candidates** for the user are unchanged: the shared-handle close (B63), the mode switch that drops selectors (B65) and an absent attribute printed as zero (B76). bug-classes.md is untouched. Gates: the checklist, kernel-citation-audit at `2cfd0d936`. | +| V114 | 25L | **Live diff:** on the running workbench VM (kernel 7.3.1, `bridge` 7.2.0 at `/nix/store/x1pwsbz5…-iproute2-7.2.0`; boot `335e7396`, started 2026-12-03 23:58 by another workbench user; not rebooted, the VM being shared), the nix-built `gobridge` (`/nix/store/q793jqi3…-gobridge-0.2.1`, built from `112dd7576`) beside `bridge`, as root over the workbench's ssh key. The script is generated from `brmonitor.rows.jsonl`. Each row gets a fresh netns with `lo` up and `nlmon0` up at ifindex 2, as the capture's namespaces have, then the row's `pre` steps in its own directory. **Live rows (18):** both monitors start in the netns; the script waits until each pid has a NETLINK_ROUTE socket (found by inode in `/proc//net/netlink`) with Dump 0 and Rmem 0 and a thread blocked in recvmsg (gobridge's link dump reads with recvfrom, so recvmsg is its listen), then 0.5 s, then runs the trigger once with `bash -c`, waits for the row's ERE in both outputs, then 0.3 s, then SIGTERMs both. Both exit 143. **File, batch and negative rows (26):** `bridge`, then `gobridge`, with the row's own `m.bin` and `b.txt`. **Result:** stdout, stderr and rc identical on 44 of 44, `Timestamp: … usec` masked, in two batches (C and D); every live row passed the readiness check, and no trigger failed. Batch D's outputs equal batch C's. `bridge` against the 25C corpus: 44 of 44 identical (live rows' rc aside, which the helper reports as 0), in both batches. That corpus is batch 5, captured on this same boot, so this repeats it on one boot rather than confirming the K notes on a second boot as the plan asked; a second boot would have meant rebooting the shared VM. V111's batch 1 is the cross-boot check for the 26 live and argument rows. **Earlier batches:** batch A's readiness check read the root namespace's `/proc/net/netlink`, so it never passed and each live row ran on the 0.5 s sleep alone (44 of 44 identical anyway); A2 and B, with the check fixed, ran without `nlmon0`, so every ifindex was one lower than in the corpus: gobridge and `bridge` still agreed on 44 of 44, and `bridge` differed from the corpus on 20 rows, all through ifindexes. Those 20 include B66 live: in file mode a record's br0 (ifindex 3) is named `d1`, the netns's ifindex 3, so `bridge monitor file m.bin` prints `master d1`, and gobridge does the same. **Guest:** its system closure had been garbage-collected on the host under the running VM (no `sed`, `awk`, `seq`, `readlink`, `sort`, `timeout` or `bash` on its PATH), so the script put host-built coreutils, gawk, gnused, bash, gnugrep and diffutils store paths first on PATH (the guest shares the host's /nix/store). Left as found: no namespaces, no core files, the script's result directories removed, no module loaded or removed (bridge, vxlan, nlmon, dummy were already loaded), VM still running as it was. **Bugs found:** none new. B66 is also seen with the ifindexes shifted, recorded in [upstream/iproute2-bridge-monitor.md](upstream/iproute2-bridge-monitor.md) (B66's entry and the status block); no lead or K note behaved differently live. | | V402 | 6C | **Fresh-boot batches — the 6C gate's last task (and 7C's conditional).** Two batches, each on its own fresh boot of the workbench VM (kernel 7.3.1, iproute2 7.2.0; `nlcap-ws down` then `up`, the guest's `is-system-running` running before the first row), each running all four `ws/bridge*` row files through `nlcap-ws batch`, the committed corpus untouched. **Boot 1:** the batch the boot's own start rejected, re-run once the boot settled — 113 (`bridge`), 63 (`bridgex`), 94 (`bridgefdb`), 74 (`bridgemdb`), 344 of 344 OK. **Boot 2:** a second down+up — 344 of 344. **`nlcapgen verdiff` against the corpus:** `bridge` 0 differences (113 rows), `bridgex` 6 (the `brrtr -s` timer rows ec-021/022/023, pw-021/022/023, V101's allow-list), `bridgefdb` 0 (94), `bridgemdb` 6 (the temp-entry timer rows ec-005/006/008, pw-005/006/008 — V108's rows and their `-j -s`/`-s -o` twins). Boot 1 against boot 2 directly: the same profile, 0/6/0/6, the same rows. **A body-level pass** (a throwaway `tmp-bodydiff`, deleted; the corpus vs each boot's pcaps, message by message, seq and pid zeroed): every differing message is one of V097's two named classes — the `br` fixture's link replies at `IFLA_BRPORT_FORWARD_DELAY_TIMER` (offsets 360/364 of the 420-488-byte messages, 33 rows), and the NLMSG_ERROR bodies' echoed request seq (offsets 24, 28-30 and 60 in the 40-, 72- and 96-byte error shapes; `0x6b03d2bc` against `0x6b129194`, minutes apart; 28 rows). 58 rows (boot 1) and 61 rows (boot 2) differ in any body at all; every other byte of every other message is identical. The stats counters and the vxlan random source port, the 6C gate's own expected exceptions, never moved. **The first fresh-boot attempt failed 34 of 113 rows:** the batch fired 24 s after qemu started, `up` returning at ssh and the guest's systemd still settling, and the first wave's rows crosstalked at their ns lifecycle ("Cannot open network namespace" immediately after `NLCAP_NS_OK wsN"; "Cannot create namespace file: File exists" after ns-add's own cleanup; ec-010's pre step 0 creating br0 and pre step 1 finding it gone; "Cannot find device nlmon0"; `NLCAP_CAP_NOBIND`, datagrams=0). The mechanism was not pinned down; the wait is measured. A batch the same boot ran two hours later was 113 of 113, and a concurrent session's batch on the same boot (a `brmonitor` corpus, 44 rows, all OK) confirms the settled guest. `xtcp2-nlcap-ws up` now waits for `is-system-running` (running or degraded) before `NLCAP_WS_UP`, warning past the timeout. **The arc's disk:** the kernel closure was GC'd twice mid-arc (nothing pinned `nix build --no-link`, the store 98-99% full; the `linux-7.3.1` build needs ~35 GB and failed twice at 31-36 GB free), and two CLI attempts were killed at their own command timeouts (600 s and 2400 s against the ~45-min kernel rebuild); the closure is now rooted at `/tmp/gobridge-vm-root`. Gates: the batch's own, and `nlcap-ws`, `nix-fmt`, `test-goip-docs`, `netlink-audit`, `lint-baseline`. | ## Decision log @@ -206,3 +237,8 @@ - **2026-11-22: the replay core is extracted before a fourth copy (6S).** gobridge would have been the fourth copy of the same ~150 lines. Each clone keeps its own sentinel and message text, so no caller or test changed. +- **2026-12-04: `IsRtnetlinkEventType` keeps its set (25P).** The plan had it gain MDB, + VLAN and TUNNEL. Its doc says it reports what `ParseRtnetlinkEvent` decodes, and + `IsRtnetlinkNotification` (linkmonitor's rdmanative source) and a parser-agreement test depend on + that. Adding the types would let notifications through that the parser then refuses. + `BrEventKind` carries the bridge types instead. diff --git a/docs/netlink/gobridge.md b/docs/netlink/gobridge.md index ee366f64f..a42d2af34 100644 --- a/docs/netlink/gobridge.md +++ b/docs/netlink/gobridge.md @@ -204,9 +204,9 @@ changed the fixtures: MST can only be enabled while no port has VLANs, so `brmst rc); - the `cmds[]` dispatch, with `help` for every object; - the writes (`link set`, `vlan add/del/set`, `vlan global set`, `vni add/del`, - `mst set`, `fdb add/append/replace/del/flush`, `mdb add/replace/del/flush`) and - `monitor` → `notImplemented` (rc 255). `fdb` and `mdb` were refused whole until - increment 7 (7R) cloned their `show` and `get`. + `mst set`, `fdb add/append/replace/del/flush`, `mdb add/replace/del/flush`) → + `notImplemented` (rc 255). `fdb` and `mdb` were refused whole until increment 7 (7R) + cloned their `show` and `get`; `monitor` until increment 25 (25R, `monitor.go`). - **One file per object:** `link.go`, `vlan.go` (show/compressed/details/stats/tunnelshow/ global), `vni.go` and `mst.go`. Each mirrors its `bridge/*.c` printer: column widths, the `-com` range printing, the headers printed before the dump, and the `-s` stats blocks. @@ -670,3 +670,35 @@ path leaves JSON writer depth > 0 → assert", if it isn't already covered by C6 Run gobridge next to `bridge` in a named netns in the guest, over the `fdbF`, `fdbVx`, `mdbM` and `mdbVx` fixtures: every 7C read command plus batch. The target is all identical, with exceptions named. A divergence is fixed with a unit row added. + +## Increment 25 — `bridge monitor` (V110–V114, DOC035) + +`bridge monitor`, live and `file F`, with `-t`, `-j`, `-d`, `-s` and the batch forms, byte for byte. This finishes +gobridge's read side; only the writes are still refused. Planned 2026-12-03, after tc's increment 24, going +bottom-up. Leads are in [upstream/iproute2-bridge-monitor.md](upstream/iproute2-bridge-monitor.md) (B58-B76, +K10-K17), not submitted to netdev. The ledger rows in [gobridge-status.md](gobridge-status.md) have the detail. + +| task | what | ledger | +|---|---|---| +| 25X | `nlmon.TstampText` (from goip); `xtcp2-nl-tcmon` made a generator; `xtcp2-nl-brmon-ws`, ready when the monitor's own socket (found by inode) is idle in recvmsg; `nix/checks/nlcap-brmon-ws.nix` | V110 | +| 25C | `ws/brmonitor`, 44 rows: 18 live over five fixtures, 12 file and batch rows over the live rows' own notifications, 14 negatives | V111 | +| 25P | `xtcpnl.BrEventKind`; `TestWsBrMonitor` decodes all 307 bridge events | V112 | +| 25R | `monitor.go` and `source_monitor.go`; corpus replay, 31 unit rows, a file fuzz, 8 mutants | V113 | +| 25B | the doc's HEAD check, summary and checklist; extension lines in [upstream/iproute2-bridge-print-paths.md](upstream/iproute2-bridge-print-paths.md) | DOC035 | +| 25L | gobridge next to `bridge` 7.2.0 on the workbench, every `brmonitor` row | V114 | + +**How the clone is put together:** + +- **Words:** do_monitor's order and matching (`f` is `file`; `vni` and `all` need the whole word). A selector + zeroes the bind mask, and `all` restores `~RTMGRP_TC` with vlan, vni and the banner. +- **Live:** `MonitorSource.Subscribe` is rtnl_open on the mask, with `AddGroup` for BRVLAN (33) and TUNNEL (35). + ll_init_map runs on the monitor's socket, then `nlmon` listens. +- **Replay:** a replay subscription plays the capture's notifications and answers the monitor's own dump from it. +- **File:** `nlmon.ReadFile`, every record to accept_msg. There's no ll_init_map, so names come from the main + source. +- **Printing:** accept_msg dispatches on `xtcpnl.BrEventKind` to the show printers. Each calls `printHeaders` + after its filters, as C does. +- **Batch state carried as bridge carries it:** the closed rth (B63), `prefix_banner` (B62), and a `-t` counter + 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. diff --git a/docs/netlink/upstream/iproute2-bridge-monitor.md b/docs/netlink/upstream/iproute2-bridge-monitor.md new file mode 100644 index 000000000..3428668c6 --- /dev/null +++ b/docs/netlink/upstream/iproute2-bridge-monitor.md @@ -0,0 +1,269 @@ +# iproute2 `bridge monitor`: groups a bare monitor never joins, word order that matters, `-j` ignored, a file mode that ignores its selectors, and statics that outlive their command + +**Status (2026-12-04, increment 25):** + +- **Not submitted to netdev.** These are drafts for the user's review, recorded here only, like the other write-ups in + this directory. No patch, no PR, no sign-off. +- **Source:** + - Line numbers are iproute2 **v7.2.0** (`880505966c17`, 2026-08-17): `bridge/monitor.c`, `bridge/bridge.c`, + `bridge/link.c`, `bridge/fdb.c`, `bridge/mdb.c`, `bridge/vlan.c`, `bridge/vni.c`, `lib/libnetlink.c`, + `lib/ll_map.c` and `lib/utils.c`, read with `git show v7.2.0:`. That is the version the corpus is captured + with. + - **"At HEAD"** is the [HEAD check](#head-check) (25B, DOC035): every B lead is still present, and every K + note's kernel code is unchanged. +- **How they were found:** in increment 25 ([gobridge.md](../gobridge.md), [gobridge-status.md](../gobridge-status.md)). + - The plan's bug-class sweep listed leads B58–B75 and kernel notes K10–K16. The numbers continue + [iproute2-bridge-print-paths.md](iproute2-bridge-print-paths.md) (B1–B57, K1–K9), so B and K stay unique across + the bridge docs. + - 25C (V111) settled each lead against a `ws/brmonitor` row: 20 confirmed, B62 and K11 corrected, B71 dropped, + B68 and B74 source only, and B76 and K17 new. Each entry keeps its prediction where the capture differed. + - 25P (V112) decoded every notification in the corpus; none was rejected, and K11 gained a detail. + - 25R (V113) cloned the monitor in gobridge. Its fuzz run found B20 reachable through `monitor file` + ([B65's section](#b65-b66-b75-file-mode)). + - 25L (V114) ran gobridge beside `bridge` 7.2.0 on the workbench, every row, live rows side by side: identical on + 44 of 44 in two batches, and `bridge` identical to its corpus on 44 of 44. That repeat was on the corpus's own + boot, not a second one (the VM is shared and was not rebooted). No lead or K note behaved differently live, and + nothing new was found; B66 was also seen with the ifindexes shifted. +- **Kernel cross-check:** `net/bridge/br_netlink.c`, `br_if.c`, `br_fdb.c`, `br_mdb.c`, `br_vlan.c`, + `br_vlan_options.c` and `drivers/net/vxlan/vxlan_vnifilter.c` at v7.4-rc4. +- **Corpus:** `pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/`, cited below as `brmonitor/` (25C). + +## Contents + +- [HEAD check](#head-check) +- [Summary](#summary) +- [B58, B68. The groups a monitor joins](#b58-b68-the-groups-a-monitor-joins) +- [B59, B60, B72. Arguments](#b59-b60-b72-arguments) +- [B61, B71. `-j` ignored](#b61-b71--j-ignored) +- [B62–B64, B69, B74. State that outlives its command](#b62b64-b69-b74-state-that-outlives-its-command) +- [B65, B66, B75. File mode](#b65-b66-b75-file-mode) +- [B67, B70, B73, B76. The printers in monitor mode](#b67-b70-b73-b76-the-printers-in-monitor-mode) +- [K10–K17. Kernel notes](#k10k17-kernel-notes) +- [Bug-class candidates](#bug-class-candidates) + +## HEAD check + +Checked 2026-12-04 (25B, DOC035). + +- **iproute2:** the GitHub mirror's `main`, `d7e038f99479` (2026-12-02), is 98 commits past v7.2.0. + - `bridge/monitor.c`, `bridge/link.c`, `bridge/fdb.c`, `bridge/mdb.c`, `bridge/vlan.c`, `lib/ll_map.c` and + `man/man8/bridge.8` are byte-identical to v7.2.0. In `bridge/`, the only change is `1392041d`, which fixes the + typo in vni.c's "Dump ternminated", half of B3 (recorded on B3 in [iproute2-bridge-print-paths.md](iproute2-bridge-print-paths.md#b3-message-typos-dump-ternminated-cannon-send-dump-request)). No lead here is affected. + - In `lib/utils.c`, `print_timestamp` and `print_nlmsg_timestamp` are unchanged (B64, B75). The commits there are + `getcmdline` (`fde561a2`, `e11870d5`) and `resolve_address`. + - `include/libnetlink.h` gains RTM_GETMULTICAST helpers (`b8cdda55`) and loses a cast (`65af2682`). + `NLMSG_TSTAMP` and `rtnl_add_nl_group` are unchanged. + - Four commits touch `lib/libnetlink.c`. Each was checked against every lead: + - `255cac0a`: `rtnl_open` connects the socket to the kernel. Notifications come from port 0, so a live + monitor still receives them. + - `9a5e7be5`: the sequence number is a counter, not `time(NULL)`. + - `9bfcf248`: `rtnl_listen` and `__rtnl_recvmsg` drop datagrams that a non-kernel sender sent. + - `c6d58ffb`: the NLMSG_OK loops change. `rtnl_listen`'s `!!!malformed message: len=N` (exit 1) becomes + `!!!Remnant of size N` (still exit 1). That path is live only; no row reaches it. ng-009 and ng-010 are file + mode, and `rtnl_from_file` is unchanged. + + `rtnl_close` still sets `fd = -1`, so B63 is present. None of the four touches the group arithmetic, the file + branch or the printers, so **every B lead is still present at HEAD**. B71 stays dropped. +- **Linux:** torvalds `master`, `007722b8211f` (2026-12-03, the net-7.4-rc6 merge). + - Since v7.4-rc4, `net/bridge/` has two commits: + - `da4a53461d46` ("bridge: mcast: Fix source list rollback on failure", `br_mdb.c`). It changes only the + rollback of a failed add or replace with a source list. K14's rows are successful adds, deletes and router + changes, so K14 is unaffected. + - `75dc1bad7897`: bridge netfilter conntrack. + - `drivers/net/vxlan/vxlan_vnifilter.c`, `include/uapi/linux/rtnetlink.h` and `include/uapi/linux/if_bridge.h` + have no commits. **Every K note's code is unchanged.** + +## Summary + +| ID | File:line (v7.2.0) | Class | Finding | Pinned by | Status | At HEAD | gobridge | +|---|---|---|---|---|---|---|---| +| B58 | monitor.c:80, :108-112 | C9, C14 | A bare monitor joins neither RTNLGRP_BRVLAN nor RTNLGRP_TUNNEL; only `all`, `vlan` and `vni` do | ec-008, ec-009 | confirmed | present | copied | +| B59 | monitor.c:90-113 | C9 | `f` is `file`, not `fdb`; `vni` and `all` need the whole word | ng-002, ng-003, ng-005, ng-006, ec-012, ec-013 | confirmed | present | copied | +| B60 | monitor.c:93-112 | C9 | Word order changes the groups: `all link` is the link group with `all`'s vlan, vni and banners | ec-010, ec-011 | confirmed | present | copied | +| B61 | monitor.c (do_monitor) | C5 | `-j` prints text: no JSON object is ever opened | ec-016, ec-023 | confirmed | present | copied | +| B62 | monitor.c:25, :112 | C16 | `prefix_banner` is never reset: a later `monitor` line in the batch prints `[LINK]`, `[NEIGH]`… | ec-028, ng-013 | corrected | present | copied | +| B63 | monitor.c:87; libnetlink.c:185 | C16 | `rtnl_close(&rth)` closes the batch's socket; a later show fails with EBADF, exit 1 | ng-012 | confirmed | present | copied | +| B64 | fdb.c:949, link.c:691, mdb.c:1083, vlan.c:1346, vni.c:389 | C16 | Every show command zeroes `timestamp`, so a later `monitor` line prints no stamps | ec-029 | confirmed | present | copied | +| B65 | monitor.c:133-145 | C14 | File mode ignores the selectors | ec-020 | confirmed | present | copied | +| B66 | monitor.c:133-145; ll_map.c | C14 | File mode names each ifindex by asking the live host, not the recording | ec-019, ng-011 | confirmed | present | copied | +| B67 | link.c:252 | C14 | `print_linkinfo` takes AF_UNSPEC: every netdev event prints as a bridge link line | ec-001, ec-014 | confirmed | present | copied | +| B68 | monitor.c:80 | C14 | `~RTMGRP_TC` joins about 30 unrelated groups, read and dropped | source | source only | present | copied | +| B69 | batch | C16 | An earlier show line's filters apply to a later `monitor` line | ec-027 | confirmed | present | copied | +| B70 | vlan.c:1071 | C14 | The vlan monitor resets the current port, so every event prints its port name again | ec-005 | confirmed | present | copied | +| B71 | mdb.c:430-433 | C6 | `print_mdb_mon`'s JSON branch is unreachable while B61 holds | ec-023 | dropped | — | — | +| B72 | monitor.c:29; bridge.8 | C10 | The usage hides `file`'s argument; `help` exits 255; the man page omits `vni` and `file` | ng-001, ng-007 | confirmed | present | copied | +| B73 | monitor.c:63 | C10 | Unknown message types are dropped silently | ec-019 | confirmed | present | copied | +| B74 | batch | C16 | A live `monitor` line never returns, so the batch's later lines never run | source | source only | present | copied | +| B75 | monitor.c:51, :70 | C14 | `-t` in file mode stamps each record with the current time, and prints the file's own stamps | ec-022 | confirmed | present | copied | +| B76 | vlan.c:948, :966-967, :1007 | C3 | An RTM_DELVLAN entry carries no STATE, and `print_vlan_rtm` prints `state disabled` for it | ec-005, ec-019 | new in 25C | present | copied | +| K10 | br_netlink.c:786-804 | kernel | `bridge vlan add` sends RTM_NEWLINK AF_BRIDGE and RTM_NEWVLAN | ec-008, ec-009 | confirmed | unchanged | — | +| K11 | br_if.c:351, :685 | kernel | A port add sends two AF_UNSPEC and three AF_BRIDGE RTM_NEWLINKs for the port; a delete ends with RTM_DELLINK AF_BRIDGE | ec-001 | corrected | unchanged | — | +| K12 | br_vlan.c:2004 | kernel | A vlan range add is one RTM_NEWVLAN with a range entry | ec-005 | confirmed | unchanged | — | +| K13 | vxlan_vnifilter.c:758 | kernel | A vni range add is one RTM_NEWTUNNEL per VNI | ec-006 | confirmed | unchanged | — | +| K14 | br_mdb.c:582-593, :617 | kernel | mdb add, replace and delete send one MDBA_MDB entry; a router port change MDBA_ROUTER with the port alone | ec-004 | confirmed | unchanged | — | +| K15 | br_fdb.c:199 | kernel | AF_INET neighbour events arrive on RTNLGRP_NEIGH too | ec-002 | confirmed | unchanged | — | +| K16 | br_fdb.c | kernel | An fdb replace is one RTM_NEWNEIGH, with no RTM_DELNEIGH first | ec-002 | confirmed | unchanged | — | +| K17 | br_vlan.c:364; br_fdb.c:457 | kernel | A vlan add on a port also sends RTM_NEWNEIGH for the port's own address in that vid | ec-007, ec-008, ec-009, ec-011 | new in 25C | unchanged | — | + +## B58, B68. The groups a monitor joins + +`do_monitor` starts from `groups = ~RTMGRP_TC` (monitor.c:80). The legacy bitmask covers groups 1 to 32, so +RTNLGRP_BRVLAN (33) and RTNLGRP_TUNNEL (35) are never in it. Only `vlan`, `vni` and `all` join them, through +`rtnl_add_nl_group` (monitor.c:150-158). + +- **B58 (confirmed, brmonitor/ec-008 and ec-009):** a bare `bridge monitor` and `bridge monitor all` differ on the + same trigger, `bridge vlan add dev d1 vid 20`. The bare monitor prints the fdb entry K17 adds and the RTM_NEWLINK + AF_BRIDGE line for d1, and no vlan event: + + ``` + 02:00:00:00:01:01 dev d1 vlan 20 master br0 permanent + 4: d1: mtu 1500 master br0 state forwarding priority 32 cost 100 + ``` + + `all` prints the same two lines with banners, and `[VLAN]d1 20` between them. Neither the usage nor bridge.8 + says that the bare form is not "everything". Both rows exit 0 under SIGTERM. +- **B68 (source only):** the same mask joins about 30 groups that no printer handles (addresses, routes, netconf, + nsid…). Each message wakes the monitor and is dropped in `accept_msg`'s `default`, which under load adds ENOBUFS + risk. No row loads the monitor, so nothing pins it. + +## B59, B60, B72. Arguments + +- **B59 (confirmed):** `file`, `link`, `fdb`, `mdb` and `vlan` go through `matches()` in that order, so `f` is + `file` and takes the next word: `bridge monitor f` prints `Command line is not complete. Try option "help"`, + rc 255 (ng-003). `fd` is `fdb` (ec-013) and `v` is `vlan` (ec-012). `vni` and `all` are `strcmp`, so `vn` and `a` + print `Argument "vn" is unknown, try "bridge monitor help".`, rc 255 (ng-006, ng-005). `h` reaches `help` + past every selector (ng-002). +- **B60 (confirmed):** `link`, `fdb`, `mdb`, `vlan` and `vni` set `groups = 0`; `all` sets it back to + `~RTMGRP_TC`. `all` also sets `lvlan`, `lvni` and `prefix_banner`, which nothing clears. On a vlan add and an fdb + add, `monitor all link` (ec-010) prints `[VLAN]` and `[LINK]` lines and no `[NEIGH]`, while `monitor link all` + (ec-011) prints all three. +- **B72 (confirmed, ng-001 and ng-007; the man page from source):** `help` prints + `Usage: bridge monitor [file | link | fdb | mdb | vlan | vni | all]` and exits 255 (C8). The line does not say + that `file` takes a name, and a bare `file` gets `Command line is not complete. Try option "help"`, rc 255. + bridge.8 lists neither `vni` nor `file FILE`. + +## B61, B71. `-j` ignored + +- **B61 (confirmed, ec-016 live and ec-023 over a file):** `do_monitor` never calls `new_json_obj`, so + `is_json_context()` stays false in every printer, and `bridge -j monitor …` prints exactly the text form. +- **B71 (dropped):** `print_mdb_mon` (mdb.c:430-433) prints the header and `print_bool(PRINT_ANY, "deleted", …)` + outside any JSON object, which would be invalid JSON under `-j`. B61 keeps the JSON side from ever running: ec-023 + prints `Deleted dev br0 port d1 grp 239.1.1.1 permanent vid 10` as text. Unreachable while B61 holds. + +## B62–B64, B69, B74. State that outlives its command + +These extend [B28, B29](iproute2-bridge-print-paths.md#b28-b29-batch-lines-inherit-the-previous-lines-filters) and +[B30](iproute2-bridge-print-paths.md#b30-a-failed-dump-ends-a--force-batch). + +- **B62 (corrected):** `prefix_banner` is a file static set by `all` and never reset. + - *Predicted:* in `bridge -batch`, `monitor file F all` followed by `fdb show` or `link show` makes those lines + print `[NEIGH]` or `[LINK]`, because their printers call `print_headers` too. + - *Seen:* a show line never gets to print. B63 has closed `rth`, so the show's dump request fails first + (`fdb.c:408-411`, `link.c:674-676`: `perror("Cannot send dump request")` then `exit(1)`). brmonitor/ng-013, + `monitor file m.bin all` then `fdb show`, prints the file with banners, then + `Cannot send dump request: Bad file descriptor`, rc 1. The banner does outlive its line, but only another + `monitor file` line can show it: ec-028, `monitor file m.bin all` then `monitor file m.bin`, prints the file + twice, both times with `[LINK]`, `[NEIGH]`, `[MDB]`, `[VLAN]` and `[TUNNEL]`. Unit row "corner: all's banner + outlives its line (B62)". +- **B63 (confirmed, ng-012):** `do_monitor` starts with `rtnl_close(&rth)` (libnetlink.c:185 sets `fd = -1`), which + closes the socket `bridge.c` opened for the whole batch. The file branch never opens another, so `monitor file + m.bin` then `vlan show` prints the file, then `Cannot send dump request: Bad file descriptor`, rc 1. The failed send + never reaches the wire; every request that did, the file's name lookups, was acknowledged, so the row is + ack-then-fail. `exit(1)` ends even a `-force` batch. +- **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. +- **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. +- **B74 (source only):** a live `monitor` line runs `rtnl_listen` until a signal, so the batch's later lines never + run, and nothing says so. A capture of it would only be a batch killed by SIGTERM, so no row pins it. + +## B65, B66, B75. File mode + +- **B65 (confirmed, ec-020):** the file branch (monitor.c:133-145) hands every record to `accept_msg`, whatever words + were given. `bridge monitor file m.bin link` prints the same fdb, mdb, vlan and vni lines as `monitor file m.bin` + (ec-019). +- **B66 (confirmed, ec-019 and ng-011):** the file branch never runs `ll_init_map`, so each ifindex in a record is + named by `ll_link_get`, which asks the live host (on a socket of its own). ec-019's file holds a vxlan remote and + vni 500 recorded on vx0 and vx1, ifindex 4. In the row's netns ifindex 4 is d1, so bridge prints + `00:00:00:00:00:00 dev d1 dst 192.0.2.2 port 4790 vni 200 self permanent` and `d1 500`. ng-011's record names + ifindex 9, which the netns lacks: the kernel answers ENODEV, bridge prints `if9 500` and exits 0. + 25L (V114) saw it again with every ifindex one lower than in the recording (two batches run without the capture's + `nlmon0` at ifindex 2): the port record's master, br0 at ifindex 3 when recorded, is named after the netns's + ifindex 3, so `bridge monitor file m.bin` (ec-019) prints `6: d3: … master d1 state forwarding priority 32 cost 9`. +- **B75 (confirmed, ec-022):** with `-t`, every record in the file gets a `Timestamp: usec` line, and the + file's own NLMSG_TSTAMP record prints as well, as `Timestamp: Thu Jan 1 00:00:00 1970 7 us`, with no stamp of + its own. +- **Extended B20:** `monitor file` hands a crafted RTM_NEWVLAN to `print_vlan_rtm`, which reaches B20's NULL read. + See [iproute2-bridge-print-paths.md](iproute2-bridge-print-paths.md#b18-b19-b20-null-reads-in-the-vlan-option-printers). + +## B67, B70, B73, B76. The printers in monitor mode + +- **B67 (confirmed, ec-001 and ec-014):** `print_linkinfo` (link.c:252) accepts AF_UNSPEC as well as AF_BRIDGE, so + `monitor link` prints every netdev event as a bridge link line: br0's changes, d3's MTU change and down + (`6: d3: mtu 1400`), and `ip link add mk0 type dummy` (`7: mk0: mtu 1500`). +- **B70 (confirmed, ec-005):** `print_vlan_rtm` in monitor mode resets `vlan_rtm_cur_ifidx = -1` (vlan.c:1071) + without `close_vlan_port`, so each event opens the port block again. In text, every event starts with its port + name: `d1 20`, `d2 30-32`, `Deleted d1 20`, `br0 10`, `d2 3999`, each under no header. +- **B73 (confirmed, ec-019):** `accept_msg`'s `default` drops unknown types silently: the file's RTM_NEWROUTE record + prints nothing, where `ip monitor` and `tc monitor` print a line for such records. +- **B76 (new in 25C, ec-005 live and ec-019 from a file):** `print_vlan_opts` starts with `__u8 state = 0` + (vlan.c:948), sets it only when `BRIDGE_VLANDB_ENTRY_STATE` is present (:966-967), and prints it unconditionally + (`print_stp_state(state)`, :1007). The kernel's RTM_DELVLAN entry carries only `BRIDGE_VLANDB_ENTRY_INFO`, so + every vlan delete prints a state the kernel never sent: + + ``` + Deleted d1 20 + state disabled + ``` + + BR_STATE_DISABLED is 0, so the absent attribute reads as "disabled". gobridge copies it. Class: C3's family (an + absent attribute used without its presence test), here as a default value rather than a NULL read; see the + candidates below. + +## K10–K17. Kernel notes + +Read at v7.4-rc4. K1–K9 are in +[iproute2-bridge-print-paths.md](iproute2-bridge-print-paths.md#k1-k2-k3-kernel-notes). + +25L (V114) reproduced every live row's notifications on the workbench, two batches identical to the corpus with +stamps masked, so no K note changed. It ran on the boot the corpus was captured on, so it is a repeat, not a second +boot. + +- **K10 (confirmed, ec-008 and ec-009):** `bridge vlan add` goes through RTM_SETLINK, and sends RTM_NEWLINK AF_BRIDGE + on RTNLGRP_LINK (`br_ifinfo_notify`) and RTM_NEWVLAN on RTNLGRP_BRVLAN (`br_vlan_notify`, br_netlink.c:786-804), + after K17's RTM_NEWNEIGH. +- **K11 (corrected, ec-001):** + - *Predicted:* a port add sends RTM_NEWLINK in both AF_UNSPEC and AF_BRIDGE; a port delete sends RTM_DELLINK + AF_BRIDGE (br_if.c:351). + - *Seen:* `ip link set d3 master br0` sends two AF_UNSPEC RTM_NEWLINKs for d3, then three AF_BRIDGE ones (the last + two byte-identical; `br_ifinfo_notify` at br_if.c:685 and the STP port-state changes), then one AF_UNSPEC for + br0. The first AF_BRIDGE message differs from the other two only in `IFLA_BRPORT_FORWARD_DELAY_TIMER`, 0 and then + 1500 (25P, `TestWsBrMonitor`). `bridge` prints all five port lines. `ip link set d3 nomaster` sends an AF_BRIDGE + RTM_NEWLINK with state disabled, the RTM_DELLINK AF_BRIDGE, then AF_UNSPEC for d3 and for br0. +- **K12 (confirmed, ec-005):** `bridge vlan add dev d2 vid 30-32` sends one RTM_NEWVLAN whose entry holds + `ENTRY_INFO` vid 30 and `ENTRY_RANGE` 32. +- **K13 (confirmed, ec-006):** `bridge vni add dev vx1 vni 600-602`, one request with a range, sends three + RTM_NEWTUNNELs, one per VNI (vxlan_vnifilter.c:758 is in a loop). +- **K14 (confirmed, ec-004):** mdb add, replace and delete each send one RTM_NEWMDB or RTM_DELMDB with one + MDBA_MDB entry. `mcast_router 2` sends RTM_NEWMDB with MDBA_ROUTER holding only MDBA_ROUTER_PORT's ifindex + (br_mdb.c:582-593): no timer and no type, which the dump's router entries carry, so bridge prints + `router port dev d2 master br0` with nothing after it. +- **K15 (confirmed, ec-002):** `ip neigh add 192.0.2.5 … dev br0` arrives as an AF_INET RTM_NEWNEIGH on + RTNLGRP_NEIGH; `print_fdb` drops it silently. +- **K16 (confirmed, ec-002):** `bridge fdb replace` moving 02:00:00:00:0a:01 from d1 to d2 sends one RTM_NEWNEIGH on + d2, with no RTM_DELNEIGH for d1. +- **K17 (new in 25C, ec-007, ec-008, ec-009, ec-011):** a vlan add on a port also adds the port's own address as a + local fdb entry in that vid (`br_fdb_add_local`, br_vlan.c:364), and `fdb_add_local` notifies it (br_fdb.c:457): + `02:00:00:00:01:01 dev d1 vlan 20 master br0 permanent` comes before the RTM_NEWLINK. Any monitor that joins + RTNLGRP_NEIGH, the bare one included, sees a vlan add as an fdb event. + +## Bug-class candidates + +For the user; [bug-classes.md](bug-classes.md) is left untouched. + +- A library close on a handle the whole batch shares, inside one command, which breaks the lines after it (B63). +- A mode switch (file against live) that silently drops the user's selectors (B65). +- An absent attribute printed as its zero value, here a state the kernel never sent (B76): C3's presence test + missing, without the crash. diff --git a/docs/netlink/upstream/iproute2-bridge-print-paths.md b/docs/netlink/upstream/iproute2-bridge-print-paths.md index aca31e353..70c728c6d 100644 --- a/docs/netlink/upstream/iproute2-bridge-print-paths.md +++ b/docs/netlink/upstream/iproute2-bridge-print-paths.md @@ -11,6 +11,8 @@ - B28-B34, B36 and B37 come from 6X ([gobridge.md](../gobridge.md#6x--the-rest-of-the-read-only-surface-v101v104-doc033)): batch mode, `-netns` and router ports, captured in `pkg/xtcpnl/testdata/7_3_1/ws/bridgex/` (rows named `bridgex/...`). B35 is latent, with a unit row in `internal/gobridge/batch_test.go`. - B38-B57 come from increment 7 (fdb and mdb, [below](#increment-7-fdb-and-mdb-b38-b57-k4-k9)). B38, B39, B40, B41, B43, B45, B47, B49, B50, B55, B56 and B57 are captured in `pkg/xtcpnl/testdata/7_3_1/ws/bridgefdb/` and `ws/bridgemdb/` (rows named `fdb ...`/`mdb ...` below). B42, B44, B46, B48, B51, B52, B53 and B54 are latent, with unit rows in `internal/gobridge/fdbmdb_test.go`. - K1-K9 are in the kernel, not iproute2. + - `bridge monitor` (increment 25) has its own doc, [iproute2-bridge-monitor.md](iproute2-bridge-monitor.md), with B58-B76 + and K10-K17. Its cases of B20, B28, B29 and B30 are "Extended in increment 25" lines below. - B14 and the lead M11 are dropped (see the end). ## Contents @@ -69,6 +71,7 @@ - [Dropped: B14, M11](#dropped-b14-m11) - [Still present in the latest code](#still-present-in-the-latest-code) - [How xtcp2 handles them](#how-xtcp2-handles-them) +- Increment 25, `bridge monitor` (B58-B76, K10-K17): in [iproute2-bridge-monitor.md](iproute2-bridge-monitor.md) ## Summary @@ -177,6 +180,9 @@ None of the show loops has a final `else`: `brlink_show`, `vlan_show` (`vlan.c:1 - `vni.c:376`: `fprintf(stderr, "Dump ternminated\n")`. This is reachable: `bridge vni show dev d1`, where `d1` is not a VXLAN device, is refused by the kernel (EINVAL, extack "The device is not a vxlan device"), and bridge prints the typo (ng-021). - `mst.c:141`: `perror("Cannon send dump request")`, on a send failure only. +- **At HEAD (checked in increment 25, 25B):** `1392041d` (2026-11-26, "bridge: vni: fix typo in error message") + fixes vni.c's "Dump ternminated". `mst.c:141`'s "Cannon send dump request" is still there at the mirror's `main`, + `d7e038f99479`. gobridge keeps 7.2.0's text, which the corpus pins (ng-021). ## B4. `mst show` exits 255 on a failed dump; the other objects exit 1 @@ -277,6 +283,8 @@ The fix is `return 0` for a message without `AF_SPEC`, and testing the filter fi The kernel always sends these today, so all three are latent. `gobridge` exits 139 with stdout lost, as bridge would (unit rows B18, B19, B20). +- **Extended in increment 25:** B20 is reachable without the kernel through `bridge monitor file F`, which hands every record to `print_vlan_rtm` (`monitor.c:63`, B65). A 36-byte file of one `RTM_NEWVLAN` record whose `BRIDGE_VLANDB_ENTRY` holds an 8-byte attribute but no `ENTRY_INFO` gets bridge to the NULL read: exit 139, stdout lost (checked with nixpkgs' `bridge` 7.2.0: rc 139 and 0 bytes of output to a file, nothing on a terminal). `FuzzGobridgeMonitorFile` found it (seed `internal/gobridge/testdata/fuzz/FuzzGobridgeMonitorFile/8ef34ef20cf93c8e`), and the fuzz oracle accepts 139 for it. Because `monitor file` reads any file, the latent NULL read becomes a crash a user can trigger with a crafted capture. See [iproute2-bridge-monitor.md](iproute2-bridge-monitor.md#b65-b66-b75-file-mode). + ## B21. `vlan global` dispatches with `strcmp` `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. @@ -329,6 +337,11 @@ so an error happens to clear it; nothing else does. **Fix sketch:** reset the filters at the top of each `*_show`, and test duplicates with a local flag, as `filter_dev` already is. +- **Extended in increment 25:** the statics reach `bridge monitor`, whose printers are the shows'. After + `fdb show dev d1`, a `monitor file m.bin` line prints d1's fdb events without `dev d1` and drops the delete on d2 + (B69, brmonitor/ec-027). `monitor ... all` adds a static of its own, `prefix_banner`, which a later `monitor` line + inherits (B62, ec-028). See [iproute2-bridge-monitor.md](iproute2-bridge-monitor.md#b62b64-b69-b74-state-that-outlives-its-command). + ## B30. A failed dump ends a `-force` batch `-force` is meant to keep a batch going past a failed command: `do_batch` breaks on a @@ -340,6 +353,12 @@ never runs and no "Command failed" is printed (ng-007). `mst show` returns -1 (B `-force` batch does go past it (ng-005). Usage, `duparg` and `incomplete_command` exit too (ng-008: `link help`). +- **Extended in increment 25:** `bridge monitor` makes every later dump line fail this way. `do_monitor` closes the + batch's socket (`rtnl_close(&rth)`), so the next show's dump request fails with + `Cannot send dump request: Bad file descriptor` and `exit(1)` (B63, brmonitor/ng-012). A missing file in + `monitor file` exits -1, which ends a `-force` batch too (ng-014). See + [iproute2-bridge-monitor.md](iproute2-bridge-monitor.md#b62b64-b69-b74-state-that-outlives-its-command). + ## B31. A missing continuation line ends the batch with exit 0 When the last line ends in `\`, `getcmdline` prints "Missing continuation line" and @@ -633,6 +652,10 @@ M11 (increment 7) was that `print_router_entries` keeps `brifname`, a pointer in - For B28-B36 and the files they live in (`bridge/bridge.c`, `bridge/mdb.c`, `lib/utils.c` `getcmdline`/`makeargs`/`do_batch`, `lib/namespace.c` `netns_switch`): `git log v7.2.0..87cb3f41` holds `fde561a2` and `e11870d5`, which free leaked buffers in `getcmdline` (B31's path; its exit status is unchanged), and `552d9842` (`resolve_address`), which is unrelated. On the GitHub mirror, `lib/namespace.c`'s newest commit, `d6a1612b` (a pid fallback in `netns_get_fd`, not `netns_switch`), is in `v7.2.0`, as are `bridge/bridge.c`'s and `bridge/mdb.c`'s newest. B28-B36 are present in the newest code, and so is B37 (`bridge/bridge.c` unchanged since `v7.2.0`). - For B38-B57 (increment 7): `git log v7.2.0..87cb3f41 -- bridge/` is still empty. On the GitHub mirror, the newest commit touching `bridge/fdb.c` or `bridge/mdb.c` is `b468824a`, which is in `v7.2.0`. B38-B56 are present in the newest code. In the helpers: `lib/json_writer.c` changed after `v7.2.0` (`c4c9a7fa`, pretty arrays and separators), but `jsonw_destroy`'s `assert(self->depth == 0)` is still there (line 122), so B51 stands. The `lib/libnetlink.c` commits after `v7.2.0` change neither the extack nor the error printing. **B57 is fixed at HEAD** by `5faf18f6`, which rewrote `ll_addr_a2n`; it is recorded for 7.2.0, the version the corpus pins. - Upstream's `bridge/` history, read from the GitHub mirrors (`iproute2/iproute2`, `shemminger/iproute2`) because git.kernel.org refused the fetch: the newest commit is `66d16c41` "bridge: whitespace cleanup" (2026-06-28), which is already in `v7.2.0`. Every finding above is present in the newest code. +- Rechecked in increment 25 (2026-12-04) against the mirror's `main`, `d7e038f99479`, 98 commits past `v7.2.0`: in `bridge/`, + the only change is `1392041d` (2026-11-26), which fixes vni.c's "Dump ternminated", so B3 is half fixed at HEAD. + `bridge/` is otherwise identical to `v7.2.0`. See [iproute2-bridge-monitor.md](iproute2-bridge-monitor.md#head-check) + for the `lib/` commits. ## How xtcp2 handles them diff --git a/internal/gobridge/fdb.go b/internal/gobridge/fdb.go index ecfa666d0..b1c95ee8a 100644 --- a/internal/gobridge/fdb.go +++ b/internal/gobridge/fdb.go @@ -36,6 +36,7 @@ func (r *runner) doFdb(args []string) error { if err := r.initMap(); err != nil { return err } + r.timestamp = 0 // every show resets -t, so a later monitor line prints no stamps (B64) if len(args) == 0 { return r.fdbShow(nil) } @@ -324,6 +325,7 @@ func (r *runner) printFdb(m Msg) (int, error) { if r.fdbDynamic && state&unix.NUD_PERMANENT != 0 { return 0, nil } + r.printHeaders("[NEIGH]") o := r.o o.openObject("") if m.Type == unix.RTM_DELNEIGH { diff --git a/internal/gobridge/gobridge.go b/internal/gobridge/gobridge.go index 53f95a348..5098187e7 100644 --- a/internal/gobridge/gobridge.go +++ b/internal/gobridge/gobridge.go @@ -14,13 +14,14 @@ // function each piece follows. // // Scope is the reads: link, vlan (show, -d, -s, -com, tunnelshow, global -// show with -s router ports), vni, mst, fdb (show, get) and mdb (show, -// get), alone or in a -batch (file or stdin, -force), with -netns, -// -family, -4 and -6. A batch keeps bridge's process state between -// lines, its leftover filters included (B28-B32, F2, M3). Every write -// (link set, vlan add/del/set, vlan global set, vni add/del, mst set, -// fdb add/append/replace/del/flush, mdb add/replace/del/flush) and -// monitor are refused. gobridge never writes. +// show with -s router ports), vni, mst, fdb (show, get), mdb (show, get) +// and monitor (live, or file, with -t), alone or in a -batch (file or +// stdin, -force), with -netns, -family, -4 and -6. A batch keeps bridge's +// process state between lines, its leftover filters included (B28-B32, +// F2, M3), and monitor's banner, closed socket and stamp counter +// (B62-B64). Every write (link set, vlan add/del/set, vlan global set, +// vni add/del, mst set, fdb add/append/replace/del/flush, mdb +// add/replace/del/flush) is refused. gobridge never writes. package gobridge import ( @@ -31,6 +32,7 @@ import ( "os" "strconv" "strings" + "time" "github.com/randomizedcoder/xtcp2/pkg/cint" ) @@ -49,8 +51,7 @@ type retCode int func (e retCode) Error() string { return "return " + strconv.Itoa(int(e)) } -// errNotImplemented is a command gobridge does not clone (a write or -// monitor). +// errNotImplemented is a command gobridge does not clone: a write. var errNotImplemented = errors.New("gobridge: not implemented") // runner is bridge's globals: the output, the option counters, the @@ -85,6 +86,13 @@ type runner struct { mdbVlan int32 // mdb.c filter_vlan vlanCurIdx int64 // vlan.c vlan_rtm_cur_ifidx; -1 for none llInited bool // ll_init_map's initialized: one link dump a process + + // monitor.c and bridge.c's monitor state, as long-lived as the rest. + timestamp int // bridge.c timestamp: -t counts, every show zeroes it (B64) + prefixBanner bool // monitor.c prefix_banner: set by all, never reset (B62) + now func() time.Time // print_timestamp's clock + mainSrc Source // the source main opened, which a live monitor subscribes on + rthClosed bool // do_monitor has closed rth (B63) } func (r *runner) errf(format string, a ...any) { @@ -108,7 +116,7 @@ type config struct { func run(cfg config, args []string, stdout, stderr io.Writer) int { w := bufio.NewWriter(stdout) - r := &runner{o: newOut(w), stderr: stderr, vlanCurIdx: -1} + r := &runner{o: newOut(w), stderr: stderr, vlanCurIdx: -1, now: nowFunc()} err := r.main(cfg, args) if errors.Is(err, errSegv) { return 139 // bridge died: its buffered stdout never reached the pipe @@ -197,6 +205,7 @@ func (r *runner) main(cfg config, args []string) error { }() r.src = s } + r.mainSrc = r.src if st.batch { // Words after -batch FILE are never looked at (B32). return r.batch(st.batchFile, cfg.stdin, st.force) @@ -238,7 +247,9 @@ func (r *runner) options(args []string, st *options) ([]string, error) { case matches(opt, "-oneline"): r.o.sl = "\\" case matches(opt, "-timestamp"): - // do_link, do_vlan and do_vni reset it; mst never prints one. + // ++timestamp; do_link, do_fdb, do_mdb, do_vlan and do_vni + // zero it, so only monitor prints a stamp (B64). + r.timestamp++ case matches(opt, "-family"): if len(args) < 2 { return nil, r.usage() @@ -317,7 +328,7 @@ func (r *runner) doCmd(obj string, args []string) error { {"mst", r.doMst}, {"vlan", r.doVlan}, {wordVni, r.doVni}, - {"monitor", r.refuse("monitor")}, + {"monitor", r.doMonitor}, {helpWord, func([]string) error { return r.usage() }}, } { if matches(obj, c.name) { diff --git a/internal/gobridge/imports_test.go b/internal/gobridge/imports_test.go index 4ec92ac61..6926efaa3 100644 --- a/internal/gobridge/imports_test.go +++ b/internal/gobridge/imports_test.go @@ -28,13 +28,14 @@ var gobridgeMayImport = map[string]string{ modulePath + "/pkg/cint": "the C integer conversions bridge's prints make (int of a u32, s64 of a u64)", modulePath + "/internal/jsonw": "jsonw_puts, the string escaper shared with the other json_writer ports; stdlib only", modulePath + "/internal/wsreplay": "the ws pcap replay core shared with the other read-only clones; xtcpnl only", + modulePath + "/internal/nlmon": "the monitor core shared with goip and gotc: rtnl_listen, rtnl_from_file and both stamps; xtcpnl only", } // gobridgeClosure is the first-party closure of gobridge's non-test files. var gobridgeClosure = []string{ modulePath + "/cmd/gobridge", modulePath + "/internal/gobridge", modulePath + "/pkg/xtcpnl", modulePath + "/internal/jsonw", modulePath + "/internal/wsreplay", - modulePath + "/pkg/cint", + modulePath + "/internal/nlmon", modulePath + "/pkg/cint", // Reached through xtcpnl's congestion-name decoder; stdlib only. modulePath + "/pkg/strpolicy", // Reached through xtcpnl's inet_diag decoders; see internal/gordma. diff --git a/internal/gobridge/link.go b/internal/gobridge/link.go index 0ef89975a..edba6a656 100644 --- a/internal/gobridge/link.go +++ b/internal/gobridge/link.go @@ -15,6 +15,7 @@ func (r *runner) doLink(args []string) error { if err := r.initMap(); err != nil { return err } + r.timestamp = 0 // every show resets -t, so a later monitor line prints no stamps (B64) if len(args) > 0 { switch { case matches(args[0], "set"), matches(args[0], "change"): @@ -156,6 +157,7 @@ func (r *runner) printLinkinfo(m Msg) (int, error) { if !ok || !validIfName(name) { return -1, nil } + r.printHeaders("[LINK]") o := r.o o.openObject("") if m.Type == unix.RTM_DELLINK { diff --git a/internal/gobridge/mdb.go b/internal/gobridge/mdb.go index 293430ad2..0b98778bb 100644 --- a/internal/gobridge/mdb.go +++ b/internal/gobridge/mdb.go @@ -50,6 +50,7 @@ func (r *runner) doMdb(args []string) error { if err := r.initMap(); err != nil { return err } + r.timestamp = 0 // every show resets -t, so a later monitor line prints no stamps (B64) if len(args) == 0 { return r.mdbShow(nil) } @@ -171,6 +172,12 @@ func (r *runner) printMdbs(m Msg) (int, error) { if !tb.Has(xtcpnl.MdbaMdb) { return 0, nil } + return r.mdbEntries(tb, ifindex) +} + +// mdbEntries is print_mdb_entries: every MDBA_MDB_ENTRY_INFO of every +// entry under MDBA_MDB. +func (r *runner) mdbEntries(tb xtcpnl.AttrTable, ifindex uint32) (int, error) { var perr error err := xtcpnl.WalkRawAttrs(tb.Bytes(xtcpnl.MdbaMdb), func(_ uint16, ent []byte) { if perr != nil { @@ -425,13 +432,42 @@ func (r *runner) printRtrs(m Msg) (int, error) { if !tb.Has(xtcpnl.MdbaRouter) { return 0, nil } + return r.routerEntries(tb, ifindex, m.Type) +} + +// printMdbMon is print_mdb_mon, bridge monitor's: the stamp and banner +// after the dev filter, "Deleted " once for the message, then its entries +// and router ports, whatever -d says. +func (r *runner) printMdbMon(m Msg) (int, error) { + tb, ifindex, rc, ok := r.parseMdbNlmsg(m) + if !ok { + return rc, nil + } + r.printHeaders("[MDB]") + if m.Type == unix.RTM_DELMDB { + r.o.boolean(printAny, "deleted", "Deleted ", true) + } + if tb.Has(xtcpnl.MdbaMdb) { + if rc, err := r.mdbEntries(tb, ifindex); rc < 0 || err != nil { + return rc, err + } + } + if tb.Has(xtcpnl.MdbaRouter) { + return r.routerEntries(tb, ifindex, m.Type) + } + return 0, nil +} + +// routerEntries is print_router_entries: a bridge's (RTM_GETMDB) router +// ports only under -d; otherwise the first port as a line. +func (r *runner) routerEntries(tb xtcpnl.AttrTable, ifindex uint32, typ uint16) (int, error) { br, err := r.indexToName(ifindex) if err != nil { return -1, err } router := tb.Bytes(xtcpnl.MdbaRouter) o := r.o - if m.Type == unix.RTM_GETMDB { + if typ == unix.RTM_GETMDB { if r.details { if err := r.routerPorts(router, br); err != nil { return -1, err diff --git a/internal/gobridge/monitor.go b/internal/gobridge/monitor.go new file mode 100644 index 000000000..3d3960aec --- /dev/null +++ b/internal/gobridge/monitor.go @@ -0,0 +1,278 @@ +package gobridge + +import ( + "errors" + "fmt" + "io" + "time" + + "github.com/randomizedcoder/xtcp2/internal/nlmon" + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" + "golang.org/x/sys/unix" +) + +// This is bridge/monitor.c: `bridge monitor`, live on the groups its words +// pick, or `bridge monitor file F` over raw nlmsghdr records, each event +// handed to the printers the shows use, which call print_headers after +// their own filters. The receive loop, the file walk and both stamps are +// internal/nlmon's, shared with goip and gotc. + +// rtmgrpTCCst is RTMGRP_TC (linux/include/uapi/linux/rtnetlink.h), the one +// legacy group a bare `bridge monitor` leaves out of its bind mask. +const rtmgrpTCCst = 0x8 + +// The groups do_monitor names (linux/include/uapi/linux/rtnetlink.h): +// RTNLGRP_LINK 1, RTNLGRP_NEIGH 3 and RTNLGRP_MDB 26 go in the bind mask; +// RTNLGRP_BRVLAN 33 and RTNLGRP_TUNNEL 35 are past its 32 bits, so +// rtnl_add_nl_group joins them. +const ( + rtnlgrpLinkCst = unix.RTNLGRP_LINK + rtnlgrpNeighCst = unix.RTNLGRP_NEIGH + rtnlgrpMdbCst = unix.RTNLGRP_MDB + rtnlgrpBrvlanCst = unix.RTNLGRP_BRVLAN + rtnlgrpTunnelCst = unix.RTNLGRP_TUNNEL +) + +// nlMgrp is lib/libnetlink.h nl_mgrp: the bind mask of a group up to 31. +func nlMgrp(group uint32) uint32 { return 1 << (group - 1) } + +// MonitorSource is a Source that can subscribe to multicast groups. +type MonitorSource interface { + Subscribe(groups uint32, errOut io.Writer) (MonitorConn, error) +} + +// MonitorConn is one subscription. AddGroup is rtnl_add_nl_group; Talk +// runs a request on it, as ll_init_map's dump runs on the monitor's own +// socket; Listen hands every message after to fn until fn fails or the +// source ends: a socket ends only on an error, a replay at the end of its +// capture. +type MonitorConn interface { + Source + AddGroup(group uint32) error + // LinkSource is where ll_link_get's lookups go while the monitor + // runs: a socket of their own, main, for a live monitor; the capture, + // searched as the monitor's dump is, for a replay. + LinkSource(main Source) Source + Listen(fn func(nlmon.Msg) error) error + Close() error +} + +// monitorUsage is monitor.c usage, which exits -1. It does not say that +// file takes a name (B72). +const monitorUsage = "Usage: bridge monitor [file | link | fdb | mdb | vlan | vni | all]\n" + +// errHandlerStop is a printer's -1 to rtnl_listen or rtnl_from_file, +// which hand it back to do_monitor. +var errHandlerStop = errors.New("gobridge: monitor handler returned -1") + +// monitorWords is what do_monitor's loop leaves: the file, and the groups. +type monitorWords struct { + file string + hasFile bool + groups uint32 + vlan bool // lvlan: join RTNLGRP_BRVLAN + vni bool // lvni: join RTNLGRP_TUNNEL +} + +// doMonitor is do_monitor. It closes the socket bridge.c opened before it +// parses a word (B63): a later batch line that sends finds it closed. +func (r *runner) doMonitor(args []string) error { + r.closeRth() + w, err := r.monitorArgs(args) + if err != nil { + return err + } + if w.hasFile { + return r.monitorFile(w.file) + } + return r.monitorLive(w) +} + +// monitorArgs is do_monitor's loop, in its order: file, link, fdb, mdb and +// vlan by prefix, vni and all exactly, then help by prefix (B59). A +// selector sets the mask to 0 and all sets it back, so the last of them +// wins (B60); all's vlan, vni and banner stay whatever follows. +func (r *runner) monitorArgs(args []string) (monitorWords, error) { + w := monitorWords{groups: ^uint32(rtmgrpTCCst)} + var link, neigh, mdb bool + for len(args) > 0 { + switch a := args[0]; { + case matches(a, "file"): + if len(args) < 2 { + return w, r.incomplete() // NEXT_ARG + } + args = args[1:] + w.file, w.hasFile = args[0], true + case matches(a, "link"): + link, w.groups = true, 0 + case matches(a, "fdb"): + neigh, w.groups = true, 0 + case matches(a, "mdb"): + mdb, w.groups = true, 0 + case matches(a, "vlan"): + w.vlan, w.groups = true, 0 + case a == wordVni: + w.vni, w.groups = true, 0 + case a == "all": + w.groups, w.vlan, w.vni = ^uint32(rtmgrpTCCst), true, true + r.prefixBanner = true // static, never reset (B62) + case matches(a, helpWord): + r.errf("%s", monitorUsage) + return w, exitCode(-1) + default: + r.errf("Argument \"%s\" is unknown, try \"bridge monitor help\".\n", a) + return w, exitCode(-1) + } + args = args[1:] + } + if link { + w.groups |= nlMgrp(rtnlgrpLinkCst) + } + if neigh { + w.groups |= nlMgrp(rtnlgrpNeighCst) + } + if mdb { + w.groups |= nlMgrp(rtnlgrpMdbCst) + } + return w, nil +} + +// monitorFile is the file branch: fopen, then rtnl_from_file with every +// record, whatever the words picked (B65), and no ll_init_map, so a name +// the cache lacks is an RTM_GETLINK per index (B66). Only fopen's failure +// exits; rtnl_from_file's -1 and a printer's are do_monitor's return. +func (r *runner) monitorFile(path string) error { + err := nlmon.ReadFile(path, r.acceptMsg) + var ne *nlmon.Error + switch { + case err == nil: + return nil + case errors.Is(err, errHandlerStop): + return retCode(-1) + case errors.As(err, &ne) && errors.Is(err, nlmon.ErrOpen): + r.errf("%s\n", ne.Text) // perror("Cannot fopen"); exit(-1) + return exitCode(-1) + case errors.As(err, &ne): + r.errf("%s\n", ne.Text) + return retCode(-1) + } + return err +} + +// monitorLive is rtnl_open on the groups (failure exits 1), the BRVLAN and +// TUNNEL joins (each failure exits 1 with its line), ll_init_map on that +// socket, then rtnl_listen, whose failure exits 2. +func (r *runner) monitorLive(w monitorWords) error { + ms, ok := r.mainSrc.(MonitorSource) + if !ok { + return fmt.Errorf("%w: bridge monitor on this source", errNotImplemented) + } + conn, err := ms.Subscribe(w.groups, r.stderr) + if err != nil { + r.errf("%v\n", err) + return exitCode(1) + } + defer func() { + if cerr := conn.Close(); cerr != nil && r.errOut == nil { + r.errOut = cerr + } + }() + if w.vlan && conn.AddGroup(rtnlgrpBrvlanCst) != nil { + r.errf("Failed to add bridge vlan group to list\n") + return exitCode(1) + } + if w.vni && conn.AddGroup(rtnlgrpTunnelCst) != nil { + r.errf("Failed to add bridge vni group to list\n") + return exitCode(1) + } + r.src = conn // rth is the monitor's socket now + r.mainSrc = conn.LinkSource(r.mainSrc) + if err := r.initMap(); err != nil { + return err + } + err = conn.Listen(func(m nlmon.Msg) error { + if err := r.acceptMsg(m); err != nil { + return err + } + r.o.flush() // rtnl_listen's fflush(stdout) after each message + return nil + }) + var ne *nlmon.Error + switch { + case err == nil: + return exitCode(0) + case errors.Is(err, errHandlerStop): + return exitCode(2) + case errors.As(err, &ne) && (errors.Is(err, nlmon.ErrMalformed) || errors.Is(err, nlmon.ErrRemnant)): + r.errf("%s\n", ne.Text) // exit(1) inside rtnl_listen + return exitCode(1) + case errors.As(err, &ne): + r.errf("%s\n", ne.Text) // Truncated message, EOF, a receive error + return exitCode(2) + } + return err +} + +// acceptMsg is accept_msg: the printer by type, NLMSG_TSTAMP's line, and +// any other type dropped with nothing said (B73). A printer's -1 ends the +// walk; its 0 or 1 does not. +func (r *runner) acceptMsg(nm nlmon.Msg) error { + m := Msg{Type: nm.Hdr.Type, Flags: nm.Hdr.Flags, Seq: nm.Hdr.Seq, PID: nm.Hdr.Pid, Body: nm.Body} + var rc int + var err error + switch obj, _ := xtcpnl.BrEventKind(m.Type); obj { + case xtcpnl.BrObjLink: + rc, err = r.printLinkinfo(m) + case xtcpnl.BrObjNeigh: + rc, err = r.printFdb(m) + case xtcpnl.BrObjMdb: + rc, err = r.printMdbMon(m) + case xtcpnl.BrObjTstamp: + r.o.raw(nlmon.TstampText(m.Body)) + case xtcpnl.BrObjVlan: + rc, err = r.printVlanRtm(m, true, false) + case xtcpnl.BrObjTunnel: + rc, err = r.printVnifilterRtm(m) + case xtcpnl.BrObjNone: + } + switch { + case err != nil: + return err + case rc < 0: + return errHandlerStop + } + return nil +} + +// printHeaders is monitor.c print_headers: the -t stamp, then the label +// once `all` has set prefix_banner. The printers call it after their +// filters, and the shows' printers are the same functions, so a banner +// set by one batch line shows in the shows after it (B62). +func (r *runner) printHeaders(label string) { + if r.timestamp != 0 { + r.o.raw(nlmon.Timestamp(r.now(), false)) + } + if r.prefixBanner { + r.o.raw(label) + } +} + +// closeRth is rtnl_close(&rth): the socket main or batch opened is closed, +// and rth.fd is -1, so a later send fails with EBADF (B63). +func (r *runner) closeRth() { + r.rthClosed = true + r.src = closedSource{} +} + +// errBadFD is a send on rth after rtnl_close: sendmsg's EBADF. +var errBadFD = fmt.Errorf("%w", unix.EBADF) + +// closedSource is rth once do_monitor has closed it: every send fails. +type closedSource struct{} + +// Talk fails as sendmsg(-1) does. +func (closedSource) Talk([]byte) (Reply, error) { return Reply{}, errBadFD } + +// nowFunc is the monitor's clock: GOBRIDGE_NOW (RFC3339) for a replay, +// else the wall clock. +func nowFunc() func() time.Time { return nlmon.NowFunc("GOBRIDGE_NOW") } diff --git a/internal/gobridge/monitor_corpus_test.go b/internal/gobridge/monitor_corpus_test.go new file mode 100644 index 000000000..0c24ac71a --- /dev/null +++ b/internal/gobridge/monitor_corpus_test.go @@ -0,0 +1,164 @@ +package gobridge + +import ( + "os" + "path/filepath" + "regexp" + "strconv" + "strings" + "testing" + "time" + + "github.com/randomizedcoder/xtcp2/internal/nlmon" + "golang.org/x/sys/unix" +) + +// monitorCorpus is the brmonitor space (gobridge 25C), apart from the +// ws/bridge* glob the shows replay. +const monitorCorpus = "../../pkg/xtcpnl/testdata/7_3_1/ws/brmonitor" + +// monitorRows pins the brmonitor corpus: every row, and the live ones. +var monitorRows = struct{ all, live int }{44, 18} + +// monitorStampRe matches print_timestamp's line; bridge has no -tshort. +var monitorStampRe = regexp.MustCompile(`(?m)^Timestamp: .* usec$`) + +func maskStamps(s string) string { return monitorStampRe.ReplaceAllString(s, "Timestamp: STAMP") } + +// checkTriggerAfterDump fails a live row whose trigger ran before bridge's +// ll_init_map dump ended: a notification ahead of the dump's NLMSG_DONE. +// rtnl_dump_filter drops what is not the dump's, so such a capture can lose +// events and still match its ERE; xtcp2-nl-brmon-ws waits for rtnl_listen +// to prevent it. +func checkTriggerAfterDump(t *testing.T, pcap string) { + t.Helper() + msgs, err := nlmon.PcapMsgs(pcap) + if err != nil { + t.Fatal(err) + } + end := nlmon.DumpEnd(msgs, unix.RTM_GETLINK) + if end == 0 { + t.Fatalf("%s: no link dump", pcap) + } + for _, i := range nlmon.Notifications(msgs) { + if i < end { + t.Fatalf("%s: notification %d, type %d, comes before the dump ends at %d", pcap, i, msgs[i].Hdr.Type, end) + } + } +} + +// shellWords splits a command line the way sh -c reads the rows: words +// apart on spaces, '...' quoting, and "..." quoting with sh's backslash +// escapes of $ ` " \ inside it. A quoted empty string is a word. It is +// gotc's. +func shellWords(s string) []string { + var out []string + var w strings.Builder + in := false + var quote byte // 0, '\'' or '"' + for i := 0; i < len(s); i++ { + c := s[i] + switch { + case quote != 0 && c == quote: + quote = 0 + case quote == '"' && c == '\\' && i+1 < len(s) && strings.IndexByte("$`\"\\", s[i+1]) >= 0: + i++ + w.WriteByte(s[i]) + case quote != 0: + w.WriteByte(c) + case c == '\'' || c == '"': + quote, in = c, true + case c == ' ': + if in { + out = append(out, w.String()) + w.Reset() + in = false + } + default: + w.WriteByte(c) + in = true + } + } + if in { + out = append(out, w.String()) + } + return out +} + +// TestGobridgeMonitorCorpus replays every brmonitor row (gobridge 25R): +// the live rows with the monitor's arguments from the helper's first word, +// the rest as they are, each in its own directory (file rows name m.bin, +// batch rows b.txt). stdout, stderr and the exit status are held to +// bridge's once the stamps are masked. An offline row must ask every +// request it recorded; a live row's capture holds the trigger's too. +// +// go test ./internal/gobridge/ -run TestGobridgeMonitorCorpus +func TestGobridgeMonitorCorpus(t *testing.T) { + t.Setenv("GOBRIDGE_NOW", "2026-12-03T10:00:00Z") + // print_nlmsg_timestamp is ctime, the local zone, and the guest's is + // UTC: a file's TSTAMP record reads as the capture printed it. The + // test is sequential, so no other test reads time.Local meanwhile. + local := time.Local + time.Local = time.UTC + t.Cleanup(func() { time.Local = local }) + base, err := filepath.Abs(monitorCorpus) + if err != nil { + t.Fatal(err) + } + entries, err := os.ReadDir(base) + if err != nil { + t.Fatal(err) + } + rows, live := 0, 0 + for _, e := range entries { + if !e.IsDir() { + continue + } + dir := filepath.Join(base, e.Name()) + c := readCmdJSON(t, dir) + rows++ + words := shellWords(c.Cmd) + isLive := len(words) > 0 && words[0] == "xtcp2-nl-brmon-ws" + if isLive { + live++ + } + t.Run(e.Name(), func(t *testing.T) { + if c.Result.Status != "OK" { + t.Fatalf("row status %s", c.Result.Status) + } + var args []string + switch { + case isLive && len(words) >= 3: + args = strings.Fields(words[1]) + case len(words) > 0 && words[0] == "bridge": + args = words[1:] + default: + t.Fatalf("cmd %q is neither bridge nor the helper", c.Cmd) + } + if isLive { + checkTriggerAfterDump(t, filepath.Join(dir, "ip.pcap")) + } + t.Chdir(dir) + got := replayIn(t, dir, strings.NewReader(""), args...) + wantRC, err := strconv.Atoi(strings.TrimSpace(readFile(t, filepath.Join(dir, "ip.rc")))) + if err != nil { + t.Fatal(err) + } + want := result{ + stdout: maskStamps(readFile(t, filepath.Join(dir, "ip.out"))), + stderr: maskStamps(readFile(t, filepath.Join(dir, "ip.err"))), + rc: wantRC, + } + got.stdout, got.stderr = maskStamps(got.stdout), maskStamps(got.stderr) + if isLive { + got.pending = 0 + } + if got != want { + t.Fatalf("%s\n got %#v\n want %#v", c.Cmd, got, want) + } + }) + } + if rows != monitorRows.all || live != monitorRows.live { + t.Errorf("%d rows, %d live; want %d, %d", rows, live, monitorRows.all, monitorRows.live) + } +} diff --git a/internal/gobridge/monitor_test.go b/internal/gobridge/monitor_test.go new file mode 100644 index 000000000..6fc4fefa6 --- /dev/null +++ b/internal/gobridge/monitor_test.go @@ -0,0 +1,307 @@ +package gobridge + +import ( + "bytes" + "encoding/binary" + "errors" + "fmt" + "io" + "os" + "path/filepath" + "strings" + "testing" + + "github.com/randomizedcoder/xtcp2/internal/nlmon" + "github.com/randomizedcoder/xtcp2/pkg/cint" + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" + "golang.org/x/sys/unix" +) + +// fakeMonSource is a fakeSource that can subscribe: the subscription's +// first Talk answers ll_init_map's dump, Listen hands it events. +type fakeMonSource struct { + fakeSource + events []Msg + dump Reply + failOpen bool + failGroup uint32 // a group AddGroup refuses + groups uint32 + added []uint32 +} + +func (f *fakeMonSource) Subscribe(groups uint32, _ io.Writer) (MonitorConn, error) { + if f.failOpen { + return nil, errors.New("Cannot open netlink socket: Protocol not supported") + } + f.groups = groups + return &fakeMonConn{f: f}, nil +} + +// Talk answers the script first; past it, an RTM_GETLINK by index is +// ll_link_get's lookup, answered for br0 (3), d1 (4) and d2 (5). +func (f *fakeMonSource) Talk(req []byte) (Reply, error) { + if len(f.replies) > 0 || len(req) < nlHeaderLen+xtcpnl.IfInfomsgSizeCst || + binary.LittleEndian.Uint16(req[4:6]) != unix.RTM_GETLINK { + return f.fakeSource.Talk(req) + } + f.reqs = append(f.reqs, req) + index := binary.LittleEndian.Uint32(req[nlHeaderLen+4 : nlHeaderLen+8]) + n, ok := map[uint32]string{3: "br0", 4: "d1", 5: "d2"}[index] + if !ok { + return rep(nlErr(unix.ENODEV)), nil + } + m := link(unix.AF_UNSPEC, index, up, name(n)) + m.Flags = 0 + return rep(m), nil +} + +type fakeMonConn struct { + f *fakeMonSource + dumped bool +} + +func (c *fakeMonConn) Talk([]byte) (Reply, error) { + if c.dumped { + return Reply{}, errScript + } + c.dumped = true + return c.f.dump, nil +} + +func (c *fakeMonConn) AddGroup(g uint32) error { + if g == c.f.failGroup { + return unix.EINVAL + } + c.f.added = append(c.f.added, g) + return nil +} + +func (c *fakeMonConn) Listen(fn func(nlmon.Msg) error) error { + for _, m := range c.f.events { + l, _ := cint.U32(len(m.Body) + nlHeaderLen) + nm := nlmon.Msg{Body: m.Body} + nm.Hdr.Len = l + nm.Hdr.Type, nm.Hdr.Flags = m.Type, m.Flags + if err := fn(nm); err != nil { + return err + } + } + return nil +} + +func (c *fakeMonConn) Close() error { return nil } + +func (c *fakeMonConn) LinkSource(main Source) Source { return main } + +// rec is one rtnl_from_file record of m. +func rec(m Msg) []byte { + l, _ := cint.U32(nlHeaderLen + len(m.Body)) + b := binary.LittleEndian.AppendUint32(nil, l) + b = binary.LittleEndian.AppendUint16(b, m.Type) + b = binary.LittleEndian.AppendUint16(b, m.Flags) + b = append(b, make([]byte, 8)...) + b = append(b, m.Body...) + for len(b)%4 != 0 { + b = append(b, 0) + } + return b +} + +// recs is ms as one rtnl_from_file file, each record padded to 4 bytes. +func recs(ms ...Msg) []byte { + n := 0 + for _, m := range ms { + n += (nlHeaderLen + len(m.Body) + 3) &^ 3 + } + b := make([]byte, 0, n) + for _, m := range ms { + b = append(b, rec(m)...) + } + return b +} + +func as(typ uint16, m Msg) Msg { m.Type = typ; return m } + +// tunMsg is an RTM_NEWTUNNEL on index holding one VNI entry. +func tunMsg(index, vni uint32) Msg { + ent := at(xtcpnl.VxlanVnifilterEntry|unix.NLA_F_NESTED, at(xtcpnl.VxlanVnifilterEntryStart, u32(vni)...)...) + b := make([]byte, xtcpnl.TunnelMsgSizeCst, xtcpnl.TunnelMsgSizeCst+len(ent)) + b[0] = unix.AF_BRIDGE + binary.LittleEndian.PutUint32(b[4:8], index) + return Msg{Type: unix.RTM_NEWTUNNEL, Body: append(b, ent...)} +} + +// monEvents is one NEW and one DEL of each object, in accept_msg's order. +func monEvents() []Msg { + fdb := neigh(4, unix.NUD_NOARP, unix.NTF_MASTER, lladdr(1), at(unix.NDA_MASTER, u32(3)...), at(unix.NDA_VLAN, u16(10)...)) + mdb := mdbMsg(unix.RTM_NEWMDB, 3, mdbEntry(4, 1, 0, 10, []byte{239, 1, 1, 1}, unix.ETH_P_IP)) + vlan := vlanMsg(4, at(xtcpnl.BridgeVlandbEntry|unix.NLA_F_NESTED, at(xtcpnl.BridgeVlandbEntryInfo, cat(u16(0), u16(20))...)...)) + return []Msg{ + port(4, "d1"), as(unix.RTM_DELLINK, port(4, "d1")), + fdb, as(unix.RTM_DELNEIGH, fdb), + mdb, as(unix.RTM_DELMDB, mdb), + as(unix.RTM_NEWVLAN, vlan), as(unix.RTM_DELVLAN, vlan), + tunMsg(5, 500), as(unix.RTM_DELTUNNEL, tunMsg(5, 500)), + } +} + +// TestGobridgeMonitorUnit runs `bridge monitor` on a fake subscription and +// on files: the word parsing and group arithmetic, the printers in monitor +// mode, file mode, and the statics a batch carries (B58-B75). +// +// go test ./internal/gobridge/ -run TestGobridgeMonitorUnit +func TestGobridgeMonitorUnit(t *testing.T) { + t.Setenv("TZ", "UTC") + t.Setenv("GOBRIDGE_NOW", "2026-12-03T10:00:00Z") + dir := t.TempDir() + write := func(n string, ms ...Msg) string { + p := filepath.Join(dir, n) + if err := os.WriteFile(p, recs(ms...), 0o600); err != nil { + t.Fatal(err) + } + return p + } + type want struct { + stdout, stderr string + rc int + groups string // the bind mask and joins, for a live row + } + + ev := monEvents() + fdb4 := ev[2] + fdb5 := neigh(5, unix.NUD_NOARP, unix.NTF_MASTER, lladdr(2), at(unix.NDA_MASTER, u32(3)...)) + inet := neigh(4, unix.NUD_PERMANENT, 0, at(unix.NDA_DST, 192, 0, 2, 5)) + inet.Body[0] = unix.AF_INET + route := Msg{Type: unix.RTM_NEWROUTE, Body: make([]byte, 12)} + unspec := link(unix.AF_UNSPEC, 7, up, name("mk0"), at(unix.IFLA_MTU, u32(1500)...)) + tstamp := Msg{Type: 15, Body: cat(u32(0), u32(7))} + all := write("all.bin", ev...) + one := write("one.bin", fdb4) + empty := write("empty.bin") + odd := write("odd.bin", inet, route, unspec, tstamp) + twoPorts := write("two.bin", fdb4, fdb5) + trunc := filepath.Join(dir, "trunc.bin") + if err := os.WriteFile(trunc, rec(fdb4)[:20], 0o600); err != nil { + t.Fatal(err) + } + bad := filepath.Join(dir, "bad.bin") + if err := os.WriteFile(bad, cat(u32(8), make([]byte, 12)), 0o600); err != nil { + t.Fatal(err) + } + nbatch := 0 + batch := func(lines ...string) string { + nbatch++ + p := filepath.Join(dir, fmt.Sprintf("b%d.txt", nbatch)) + if err := os.WriteFile(p, []byte(strings.Join(lines, "\n")+"\n"), 0o600); err != nil { + t.Fatal(err) + } + return p + } + fdbShowD1 := []Reply{cache(), rep(done())} + linkShow := []Reply{cache(), rep(port(4, "d1"), done())} + tests := []struct { + description string + args string + mon fakeMonSource + expected want + }{ + // Positive. + {"positive: a bare monitor prints each object's NEW and DEL", "monitor", + fakeMonSource{events: ev}, want{stdout: "4: d1: mtu 1500 master br0 state forwarding priority 32 cost 100 \nDeleted 4: d1: mtu 1500 master br0 state forwarding priority 32 cost 100 \n02:00:00:00:00:01 dev d1 vlan 10 master master br0 static\nDeleted 02:00:00:00:00:01 dev d1 vlan 10 master master br0 static\ndev br0 port d1 grp 239.1.1.1 permanent vid 10\nDeleted dev br0 port d1 grp 239.1.1.1 permanent vid 10\nd1 20\n state disabled \nDeleted d1 20\n state disabled \nd2 500 \nDeleted d2 500 \n", groups: "0xfffffff7 []"}}, + {"positive: all prefixes each line with its banner", "monitor all", + fakeMonSource{events: ev}, want{stdout: "[LINK]4: d1: mtu 1500 master br0 state forwarding priority 32 cost 100 \n[LINK]Deleted 4: d1: mtu 1500 master br0 state forwarding priority 32 cost 100 \n[NEIGH]02:00:00:00:00:01 dev d1 vlan 10 master master br0 static\n[NEIGH]Deleted 02:00:00:00:00:01 dev d1 vlan 10 master master br0 static\n[MDB]dev br0 port d1 grp 239.1.1.1 permanent vid 10\n[MDB]Deleted dev br0 port d1 grp 239.1.1.1 permanent vid 10\n[VLAN]d1 20\n state disabled \n[VLAN]Deleted d1 20\n state disabled \n[TUNNEL]d2 500 \n[TUNNEL]Deleted d2 500 \n", groups: "0xfffffff7 [33 35]"}}, + {"positive: link is RTNLGRP_LINK alone", "monitor link", fakeMonSource{}, want{groups: "0x1 []"}}, + {"positive: vlan binds no group and joins BRVLAN (B58)", "monitor vlan", fakeMonSource{}, want{groups: "0x0 [33]"}}, + {"positive: fdb mdb vni", "monitor fdb mdb vni", fakeMonSource{}, want{groups: "0x2000004 [35]"}}, + {"positive: all link is link's group with all's joins and banner (B60)", "monitor all link", + fakeMonSource{events: ev[:1]}, want{stdout: "[LINK]4: d1: mtu 1500 master br0 state forwarding priority 32 cost 100 \n", groups: "0x1 [33 35]"}}, + {"positive: link all is every group (B60)", "monitor link all", fakeMonSource{}, want{groups: "0xfffffff7 [33 35]"}}, + {"positive: a file of every object", "monitor file " + all, fakeMonSource{}, want{stdout: "4: d1: mtu 1500 master br0 state forwarding priority 32 cost 100 \nDeleted 4: d1: mtu 1500 master br0 state forwarding priority 32 cost 100 \n02:00:00:00:00:01 dev d1 vlan 10 master master br0 static\nDeleted 02:00:00:00:00:01 dev d1 vlan 10 master master br0 static\ndev br0 port d1 grp 239.1.1.1 permanent vid 10\nDeleted dev br0 port d1 grp 239.1.1.1 permanent vid 10\nd1 20\n state disabled \nDeleted d1 20\n state disabled \nd2 500 \nDeleted d2 500 \n"}}, + // Negative. + {"negative: f is file and wants a name (B59)", "monitor f", fakeMonSource{}, want{stderr: "Command line is not complete. Try option \"help\"\n", rc: 255}}, + {"negative: a is not all (B59)", "monitor a", fakeMonSource{}, want{stderr: "Argument \"a\" is unknown, try \"bridge monitor help\".\n", rc: 255}}, + {"negative: vn is neither vlan nor vni (B59)", "monitor vn", fakeMonSource{}, want{stderr: "Argument \"vn\" is unknown, try \"bridge monitor help\".\n", rc: 255}}, + {"negative: fdbx", "monitor fdbx", fakeMonSource{}, want{stderr: "Argument \"fdbx\" is unknown, try \"bridge monitor help\".\n", rc: 255}}, + {"negative: help (B72)", "monitor help", fakeMonSource{}, want{stderr: "Usage: bridge monitor [file | link | fdb | mdb | vlan | vni | all]\n", rc: 255}}, + {"negative: h is help", "monitor h", fakeMonSource{}, want{stderr: "Usage: bridge monitor [file | link | fdb | mdb | vlan | vni | all]\n", rc: 255}}, + {"negative: file with no name", "monitor file", fakeMonSource{}, want{stderr: "Command line is not complete. Try option \"help\"\n", rc: 255}}, + {"negative: a missing file", "monitor file " + filepath.Join(dir, "nosuch"), fakeMonSource{}, want{stderr: "Cannot fopen: No such file or directory\n", rc: 255}}, + {"negative: the socket cannot open", "monitor", fakeMonSource{failOpen: true}, want{stderr: "Cannot open netlink socket: Protocol not supported\n", rc: 1}}, + {"negative: BRVLAN cannot be joined", "monitor vlan", fakeMonSource{failGroup: 33}, want{stderr: "Failed to add bridge vlan group to list\n", rc: 1}}, + {"negative: TUNNEL cannot be joined", "monitor vni", fakeMonSource{failGroup: 35}, want{stderr: "Failed to add bridge vni group to list\n", rc: 1}}, + // Boundary. + {"boundary: an empty file", "monitor file " + empty, fakeMonSource{}, want{}}, + {"boundary: one record", "monitor file " + one, fakeMonSource{}, want{stdout: "02:00:00:00:00:01 dev d1 vlan 10 master master br0 static\n"}}, + {"boundary: a record cut short", "monitor file " + trunc, fakeMonSource{}, want{stderr: "rtnl-from_file: truncated message\n", rc: 255}}, + {"boundary: a length under the header's", "monitor file " + bad, fakeMonSource{}, want{stderr: "!!!malformed message: len=8 @16\n", rc: 255}}, + // Corner. + {"corner: file mode ignores the selectors (B65)", "monitor file " + one + " link", fakeMonSource{}, want{stdout: "02:00:00:00:00:01 dev d1 vlan 10 master master br0 static\n"}}, + {"corner: -j prints text (B61)", "-j monitor file " + one, fakeMonSource{}, want{stdout: "02:00:00:00:00:01 dev d1 vlan 10 master master br0 static\n"}}, + {"corner: -t stamps each record, and a TSTAMP prints (B75)", "-t monitor file " + odd, fakeMonSource{}, want{stdout: "Timestamp: Thu Dec 3 10:00:00 2026 0 usec\n7: mk0: mtu 1500 \nTimestamp: Thu Jan 1 00:00:00 1970 7 us\n"}}, + {"corner: an AF_INET neighbor and a route dropped, an AF_UNSPEC link printed (B67, B73)", + "monitor file " + odd, fakeMonSource{}, want{stdout: "7: mk0: mtu 1500 \nTimestamp: Thu Jan 1 00:00:00 1970 7 us\n"}}, + {"corner: a show's dev filter applies to a later monitor (B69)", + "-batch " + batch("fdb show dev d1", "monitor file "+twoPorts), fakeMonSource{fakeSource: fakeSource{replies: fdbShowD1}}, want{stdout: "02:00:00:00:00:01 vlan 10 master master br0 static\n"}}, + {"corner: all's banner outlives its line (B62)", + "-batch " + batch("monitor file "+one+" all", "monitor file "+one), fakeMonSource{}, want{stdout: "[NEIGH]02:00:00:00:00:01 dev d1 vlan 10 master master br0 static\n[NEIGH]02:00:00:00:00:01 dev d1 vlan 10 master master br0 static\n"}}, + {"corner: monitor closes the batch's socket (B63)", + "-batch " + batch("monitor file "+one, "vlan show"), fakeMonSource{}, want{stdout: "02:00:00:00:00:01 dev d1 vlan 10 master master br0 static\n", stderr: "Cannot send dump request: Bad file descriptor\n", rc: 1}}, + {"corner: a show zeroes -t before a later monitor (B64)", + "-t -batch " + batch("link show", "monitor file "+one), fakeMonSource{fakeSource: fakeSource{replies: linkShow}}, want{stdout: "4: d1: mtu 1500 master br0 state forwarding priority 32 cost 100 \n02:00:00:00:00:01 dev d1 vlan 10 master master br0 static\n"}}, + } + for _, tc := range tests { + t.Run(tc.description, func(t *testing.T) { + f := tc.mon + if f.dump.Msgs == nil { + f.dump = cache() + } + var stdout, stderr bytes.Buffer + rc := run(config{src: &f}, strings.Fields(tc.args), &stdout, &stderr) + got := want{stdout: stdout.String(), stderr: stderr.String(), rc: rc} + if tc.expected.groups != "" { + got.groups = fmt.Sprintf("%#x %v", f.groups, f.added) + } + if got != tc.expected { + t.Errorf("\n got %#v\n want %#v", got, tc.expected) + t.Logf("GOT %q|%q|%d|%q", got.stdout, got.stderr, got.rc, got.groups) + } + }) + } +} + +// FuzzGobridgeMonitorFile runs `bridge monitor file F` over arbitrary bytes, +// with up to two selector words: no panic, and only bridge's exit codes, +// 134 and 139 among them where bridge itself aborts or dies of SIGSEGV. Its +// first run found a vlan record whose entry has no +// BRIDGE_VLANDB_ENTRY_INFO: print_vlan_opts reads it through NULL (B20, +// reached through monitor file), kept as a seed. +// +// go test ./internal/gobridge/ -run '^$' -fuzz FuzzGobridgeMonitorFile -fuzztime 60s +func FuzzGobridgeMonitorFile(f *testing.F) { + evs := monEvents() + all := recs(evs...) + for _, m := range evs { + f.Add(rec(m), uint8(0)) + } + f.Add(all, uint8(1)) + f.Add(all, uint8(7)) + f.Add([]byte{}, uint8(0)) + f.Add(cat(u32(0xffffffff), make([]byte, 12)), uint8(0)) + f.Add(rec(Msg{Type: 15, Body: u32(1)}), uint8(2)) + words := []string{"", "link", "fdb", "mdb", "vlan", "vni", "all", "link all"} + dir := f.TempDir() + f.Fuzz(func(t *testing.T, data []byte, sel uint8) { + p := filepath.Join(dir, "f.bin") + if err := os.WriteFile(p, data, 0o600); err != nil { + t.Fatal(err) + } + args := append([]string{"monitor", "file", p}, strings.Fields(words[int(sel)%len(words)])...) + src := &fakeMonSource{} + var stdout, stderr bytes.Buffer + switch rc := run(config{src: src}, args, &stdout, &stderr); rc { + case 0, 1, 2, 255, 134, 139: + default: + t.Fatalf("rc %d; stderr %q", rc, stderr.String()) + } + }) +} diff --git a/internal/gobridge/print.go b/internal/gobridge/print.go index d452f46a2..6147e2781 100644 --- a/internal/gobridge/print.go +++ b/internal/gobridge/print.go @@ -100,10 +100,17 @@ func (o *out) deleteJSONObj() { } } -func (o *out) isJSON() bool { return o.jw != nil } -func (o *out) jsonCtx(t outType) bool { return o.jw != nil && t&(printJSON|printAny) != 0 } -func (o *out) fpCtx(t outType) bool { return o.jw == nil && t&(printFP|printAny) != 0 } -func (o *out) printf(s string) { o.raw(s) } +func (o *out) isJSON() bool { return o.jw != nil } +func (o *out) jsonCtx(t outType) bool { return o.jw != nil && t&(printJSON|printAny) != 0 } +func (o *out) fpCtx(t outType) bool { return o.jw == nil && t&(printFP|printAny) != 0 } +func (o *out) printf(s string) { o.raw(s) } + +// flush is fflush(stdout), which rtnl_listen runs after each message. +func (o *out) flush() { + if err := o.w.Flush(); err != nil && o.err == nil { + o.err = err + } +} func (o *out) colored(c colorAttr) bool { return o.color && c != colorNone } // colorText is color_fprintf: the text wrapped in the attribute's color diff --git a/internal/gobridge/rtnl.go b/internal/gobridge/rtnl.go index 839ff58b3..770b2d0f1 100644 --- a/internal/gobridge/rtnl.go +++ b/internal/gobridge/rtnl.go @@ -2,6 +2,7 @@ package gobridge import ( "encoding/binary" + "errors" "fmt" "strconv" "strings" @@ -90,6 +91,12 @@ func (r *runner) talk(req []byte, err error) (Reply, error) { // rtnl_dump_error prints. func (r *runner) dump(req []byte, berr error, filter func(Msg) int) (int, error) { rep, err := r.talk(req, berr) + if errors.Is(err, errBadFD) { + // rth closed by an earlier monitor line (B63): the send's perror, + // and exit(1), as ll_init_map and the shows' dumps do. + r.errf("Cannot send dump request: %s\n", strerror(unix.EBADF)) + return 0, exitCode(1) + } if err != nil { return 0, err } @@ -216,7 +223,16 @@ func (r *runner) linkGet(name string, index uint32) (uint32, error) { } else { req, berr = xtcpnl.BuildGetLinkByIndexRequest(unix.AF_UNSPEC, cint.Int(index), llMaskCst, r.nextSeq()) } - rep, err := r.talk(req, berr) + if berr != nil { + return 0, fmt.Errorf("gobridge: building a request: %w", berr) + } + // ll_link_get opens a socket of its own, so it still answers once + // do_monitor has closed rth (B66) or made it the monitor's. + src := r.src + if r.mainSrc != nil { + src = r.mainSrc + } + rep, err := src.Talk(req) if err != nil { return 0, err } diff --git a/internal/gobridge/source.go b/internal/gobridge/source.go index aceb91e50..11daad0cc 100644 --- a/internal/gobridge/source.go +++ b/internal/gobridge/source.go @@ -26,7 +26,10 @@ type Source interface { var ErrReplay = errors.New("gobridge: replay") // ReplaySource answers from a ws pcap capture, request by request. -type ReplaySource struct{ *wsreplay.Replay } +type ReplaySource struct { + *wsreplay.Replay + path string // the capture, which a monitor's Subscribe reads again +} // NewReplaySource opens the ws pcap at path. func NewReplaySource(path string) (*ReplaySource, error) { @@ -34,7 +37,7 @@ func NewReplaySource(path string) (*ReplaySource, error) { if err != nil { return nil, err } - return &ReplaySource{Replay: r}, nil + return &ReplaySource{Replay: r, path: path}, nil } // errLive wraps a live socket failure. diff --git a/internal/gobridge/source_monitor.go b/internal/gobridge/source_monitor.go new file mode 100644 index 000000000..e6e15c0a6 --- /dev/null +++ b/internal/gobridge/source_monitor.go @@ -0,0 +1,190 @@ +package gobridge + +import ( + "bytes" + "errors" + "fmt" + "io" + + "github.com/randomizedcoder/xtcp2/internal/nlmon" + "github.com/randomizedcoder/xtcp2/internal/wsreplay" + "github.com/randomizedcoder/xtcp2/pkg/cint" + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" + "golang.org/x/sys/unix" +) + +// rcvbufCst and sndbufCst are rtnl_open's socket buffers +// (lib/libnetlink.c: rcvbuf = 1024 * 1024, sndbuf = 32768). +const ( + rcvbufCst = 1 << 20 + sndbufCst = 32768 +) + +// Subscribe is rtnl_open(&rth, groups): a new socket bound to the groups, +// with rtnl_open's buffers and extended acks. errOut takes what +// rtnl_listen prints and carries on after. It is gotc's, with +// rtnl_add_nl_group added. +func (s *LiveSource) Subscribe(groups uint32, errOut io.Writer) (MonitorConn, error) { + fd, err := unix.Socket(unix.AF_NETLINK, unix.SOCK_RAW|unix.SOCK_CLOEXEC, unix.NETLINK_ROUTE) + if err != nil { + return nil, fmt.Errorf("%w: socket: %w", errLive, err) + } + c := &liveMonitorConn{fd: fd, errOut: errOut, buf: make([]byte, 1<<20)} + abandon := func(cause error) error { return errors.Join(cause, c.Close()) } + if err := unix.SetsockoptInt(fd, unix.SOL_SOCKET, unix.SO_SNDBUF, sndbufCst); err != nil { + return nil, abandon(fmt.Errorf("%w: SO_SNDBUF: %w", errLive, err)) + } + if err := unix.SetsockoptInt(fd, unix.SOL_SOCKET, unix.SO_RCVBUF, rcvbufCst); err != nil { + return nil, abandon(fmt.Errorf("%w: SO_RCVBUF: %w", errLive, err)) + } + if err := unix.SetsockoptInt(fd, unix.SOL_NETLINK, unix.NETLINK_EXT_ACK, 1); err != nil { + return nil, abandon(fmt.Errorf("%w: NETLINK_EXT_ACK: %w", errLive, err)) + } + if err := unix.Bind(fd, &unix.SockaddrNetlink{Family: unix.AF_NETLINK, Groups: groups}); err != nil { + return nil, abandon(fmt.Errorf("%w: bind: %w", errLive, err)) + } + sa, err := unix.Getsockname(fd) + if err != nil { + return nil, abandon(fmt.Errorf("%w: getsockname: %w", errLive, err)) + } + if nl, ok := sa.(*unix.SockaddrNetlink); ok { + c.pid = nl.Pid + } + return c, nil +} + +// liveMonitorConn is the subscribed socket. +type liveMonitorConn struct { + fd int + pid uint32 // the socket's port id, rth->local.nl_pid + errOut io.Writer + buf []byte +} + +// Close releases the socket. +func (c *liveMonitorConn) Close() error { + if c.fd < 0 { + return nil + } + err := unix.Close(c.fd) + c.fd = -1 + return err +} + +// Talk sends req and reads its reply as rtnl_dump_filter does on a +// subscribed socket: a message not to this socket's port id with the +// request's sequence number is a notification, and is skipped. +func (c *liveMonitorConn) Talk(req []byte) (Reply, error) { + if len(req) < nlHeaderLen { + return Reply{}, fmt.Errorf("%w: a request of %d bytes", errLive, len(req)) + } + seq := xtcpnl.NativeEndian().Uint32(req[8:12]) + if err := unix.Sendto(c.fd, req, 0, &unix.SockaddrNetlink{Family: unix.AF_NETLINK}); err != nil { + return Reply{}, fmt.Errorf("%w: send: %w", errLive, err) + } + var rep Reply + for { + n, _, err := unix.Recvfrom(c.fd, c.buf, 0) + if err != nil { + return Reply{}, fmt.Errorf("%w: recv: %w", errLive, err) + } + for _, m := range wsreplay.SplitMsgs(c.buf[:n]) { + if m.PID != c.pid || m.Seq != seq { + continue + } + m.Body = append([]byte(nil), m.Body...) + rep.Msgs = append(rep.Msgs, m) + if m.Type == unix.NLMSG_DONE || m.Type == unix.NLMSG_ERROR || m.Flags&unix.NLM_F_MULTI == 0 { + return rep, nil + } + } + } +} + +// LinkSource is main: ll_link_get opens a socket of its own. +func (c *liveMonitorConn) LinkSource(main Source) Source { return main } + +// AddGroup is rtnl_add_nl_group: NETLINK_ADD_MEMBERSHIP, for a group past +// the bind mask's 32 bits. +func (c *liveMonitorConn) AddGroup(group uint32) error { + return unix.SetsockoptInt(c.fd, unix.SOL_NETLINK, unix.NETLINK_ADD_MEMBERSHIP, int(cint.Int(group))) +} + +// Listen is rtnl_listen on the socket. +func (c *liveMonitorConn) Listen(fn func(nlmon.Msg) error) error { + return nlmon.Listen(c.fd, nlmon.ListenOpts{ErrOut: c.errOut}, fn) +} + +// Subscribe on a replay is its capture's notifications, as internal/nlmon +// classifies them, whatever the groups: the capture holds what the kernel +// sent the monitor that ran, the trigger's requests and acks among it. +func (s *ReplaySource) Subscribe(uint32, io.Writer) (MonitorConn, error) { + msgs, err := nlmon.PcapMsgs(s.path) + if err != nil { + return nil, errors.Join(ErrReplay, err) + } + return &replayMonitorConn{msgs: msgs, notes: nlmon.Notifications(msgs)}, nil +} + +// replayMonitorConn plays a monitor capture: the dump run on the +// subscription, then the notifications after it. +type replayMonitorConn struct { + msgs []nlmon.Msg + notes []int + start int // past the last dump answered: what came before is lost +} + +// Talk answers a dump from the capture: the first request from start on +// with the same type and flags and the same body, then every message with +// its sequence number that is not a request, through its NLMSG_DONE or +// NLMSG_ERROR. The trigger's requests in between are another process's, +// so this does not go through the source's in-order replay. +func (c *replayMonitorConn) Talk(req []byte) (Reply, error) { + if len(req) < nlHeaderLen { + return Reply{}, fmt.Errorf("%w: a request of %d bytes", ErrReplay, len(req)) + } + ne := xtcpnl.NativeEndian() + typ, flags := ne.Uint16(req[4:6]), ne.Uint16(req[6:8]) + at := -1 + for i := c.start; i < len(c.msgs); i++ { + h := &c.msgs[i].Hdr + if h.Type == typ && h.Flags == flags && h.Pid == 0 && bytes.Equal(c.msgs[i].Body, req[nlHeaderLen:]) { + at = i + break + } + } + if at < 0 { + return Reply{}, fmt.Errorf("%w: the monitor's request %x is not in the capture", ErrReplay, req) + } + seq := c.msgs[at].Hdr.Seq + var rep Reply + for i := at + 1; i < len(c.msgs); i++ { + m := &c.msgs[i] + h := m.Hdr + if h.Seq != seq || (h.Flags&unix.NLM_F_REQUEST != 0 && h.Pid == 0) { + continue + } + rep.Msgs = append(rep.Msgs, Msg{Type: h.Type, Flags: h.Flags, Seq: h.Seq, PID: h.Pid, Body: m.Body}) + if h.Type == unix.NLMSG_DONE || h.Type == unix.NLMSG_ERROR || h.Flags&unix.NLM_F_MULTI == 0 { + c.start = i + 1 + return rep, nil + } + } + return Reply{}, fmt.Errorf("%w: the monitor's dump has no NLMSG_DONE", ErrReplay) +} + +// LinkSource is the capture: a lookup's request is found from start on +// past the trigger's, as the monitor's dump is. +func (c *replayMonitorConn) LinkSource(Source) Source { return c } + +// AddGroup has nothing to join: the capture holds what was sent. +func (c *replayMonitorConn) AddGroup(uint32) error { return nil } + +// Listen hands each notification from start on to fn, through +// rtnl_listen's 16384-byte buffer. +func (c *replayMonitorConn) Listen(fn func(nlmon.Msg) error) error { + return nlmon.Replay(c.msgs, c.notes, c.start, 0, fn) +} + +// Close has nothing to release. +func (c *replayMonitorConn) Close() error { return nil } diff --git a/internal/gobridge/testdata/fuzz/FuzzGobridgeMonitorFile/8ef34ef20cf93c8e b/internal/gobridge/testdata/fuzz/FuzzGobridgeMonitorFile/8ef34ef20cf93c8e new file mode 100644 index 000000000..0850f410c --- /dev/null +++ b/internal/gobridge/testdata/fuzz/FuzzGobridgeMonitorFile/8ef34ef20cf93c8e @@ -0,0 +1,3 @@ +go test fuzz v1 +[]byte("$\x00\x00\x00p\x000000000000\a0000000\f\x00\x01\x80\b\x00000000") +byte('\x00') diff --git a/internal/gobridge/vlan.go b/internal/gobridge/vlan.go index b9a5b7e6a..2eb6e40fe 100644 --- a/internal/gobridge/vlan.go +++ b/internal/gobridge/vlan.go @@ -70,6 +70,7 @@ func (r *runner) doVlan(args []string) error { if err := r.initMap(); err != nil { return err } + r.timestamp = 0 // every show resets -t, so a later monitor line prints no stamps (B64) if len(args) == 0 { return r.vlanShow(nil, subjectVlan) } @@ -189,7 +190,7 @@ func (r *runner) vlanShow(args []string, subject vlanSubject) error { } req, berr := xtcpnl.BuildDumpBrVlanRequest(flags, r.nextSeq()) r.vlanHeader(false) - if err := r.dumpOrExit(req, berr, func(m Msg) (int, error) { return r.printVlanRtm(m, false) }); err != nil { + if err := r.dumpOrExit(req, berr, func(m Msg) (int, error) { return r.printVlanRtm(m, false, false) }); err != nil { return err } if r.vlanCurIdx != -1 { @@ -236,7 +237,7 @@ func (r *runner) vlanGlobalShow(args []string) error { r.o.newJSONObj() req, berr := xtcpnl.BuildDumpBrVlanRequest(xtcpnl.BridgeVlandbDumpfGlobal, r.nextSeq()) r.vlanHeader(false) - if err := r.dumpOrExit(req, berr, func(m Msg) (int, error) { return r.printVlanRtm(m, true) }); err != nil { + if err := r.dumpOrExit(req, berr, func(m Msg) (int, error) { return r.printVlanRtm(m, false, true) }); err != nil { return err } if r.vlanCurIdx != -1 { @@ -438,8 +439,10 @@ func (r *runner) printVlanTunnelInfo(spec []byte, index uint32) error { return err } -// printVlanRtm is print_vlan_rtm, the RTM_GETVLAN dump's callback. -func (r *runner) printVlanRtm(m Msg, globalOnly bool) (int, error) { +// printVlanRtm is print_vlan_rtm, the RTM_GETVLAN dump's callback and +// bridge monitor's (monitor true). A monitor forgets the open port before +// each event without closing it (B70). +func (r *runner) printVlanRtm(m Msg, monitor, globalOnly bool) (int, error) { if m.Type != unix.RTM_NEWVLAN && m.Type != unix.RTM_DELVLAN && m.Type != unix.RTM_GETVLAN { r.errf("Unknown vlan rtm message: %08x %08x %08x\n", len(m.Body)+nlHeaderLen, m.Type, m.Flags) return 0, nil @@ -455,9 +458,13 @@ func (r *runner) printVlanRtm(m Msg, globalOnly bool) (int, error) { if r.vlanIndex != 0 && r.vlanIndex != index { return 0, nil } + r.printHeaders("[VLAN]") if m.Type == unix.RTM_DELVLAN { r.o.boolean(printAny, "deleted", "Deleted ", true) } + if monitor { + r.vlanCurIdx = -1 + } if r.vlanCurIdx != -1 && r.vlanCurIdx != int64(index) { r.closeVlanPort() r.vlanCurIdx = -1 diff --git a/internal/gobridge/vni.go b/internal/gobridge/vni.go index a4e908e0d..17291d890 100644 --- a/internal/gobridge/vni.go +++ b/internal/gobridge/vni.go @@ -19,6 +19,7 @@ func (r *runner) doVni(args []string) error { if err := r.initMap(); err != nil { return err } + r.timestamp = 0 // every show resets -t, so a later monitor line prints no stamps (B64) if len(args) == 0 { return r.vniShow(nil) } @@ -111,6 +112,7 @@ func (r *runner) printVnifilterRtm(m Msg) (int, error) { if r.vniIndex != 0 && r.vniIndex != index { return 0, nil } + r.printHeaders("[TUNNEL]") o := r.o if m.Type == unix.RTM_DELTUNNEL { o.boolean(printAny, "deleted", "Deleted ", true) diff --git a/internal/goip/obj_monitor.go b/internal/goip/obj_monitor.go index cf98b13ef..ad31f604f 100644 --- a/internal/goip/obj_monitor.go +++ b/internal/goip/obj_monitor.go @@ -67,9 +67,8 @@ const ( monitorDeletedCst = "Deleted " monitorAllNsidCst = "all-nsid" monitorHelpCst = "help" - // nlmsgTstampCst is NLMSG_TSTAMP (include/libnetlink.h), the record - // rtmon writes ahead of each batch in its file. - nlmsgTstampCst = 15 + // nlmsgTstampCst is NLMSG_TSTAMP (nlmon.NlmsgTstampCst). + nlmsgTstampCst = nlmon.NlmsgTstampCst // The rtnetlink multicast families of an mroute, RTNL_FAMILY_IPMR and // RTNL_FAMILY_IP6MR. rtnlFamilyIPMRCst = 128 @@ -406,7 +405,7 @@ func (m *monitor) render(msg *monitorMsg) (out, errOut string, err error) { case unix.RTM_NEWRULE, unix.RTM_DELRULE: return m.rule(msg) case nlmsgTstampCst: - return tstampText(body), "", nil + return nlmon.TstampText(body), "", nil case unix.RTM_NEWNETCONF, unix.RTM_DELNETCONF: return m.netconf(msg) case unix.RTM_NEWNSID, unix.RTM_DELNSID: @@ -465,17 +464,6 @@ const asctimeLayoutCst = "Mon Jan _2 15:04:05 2006" // timestampText is print_timestamp (nlmon.Timestamp). func timestampText(t time.Time, short bool) string { return nlmon.Timestamp(t, short) } -// tstampText is print_nlmsg_timestamp, an NLMSG_TSTAMP record's seconds and -// microseconds, two u32s. `ip` reads them whatever the length; a short body -// reads as zeros here. -func tstampText(body []byte) string { - var w [8]byte - copy(w[:], body) - secs := int64(xtcpnl.NativeEndian().Uint32(w[0:4])) - usecs := xtcpnl.NativeEndian().Uint32(w[4:8]) - return fmt.Sprintf("Timestamp: %s %d us\n", time.Unix(secs, 0).Local().Format(asctimeLayoutCst), usecs) -} - // route is accept_msg's route arm: a cache entry is skipped, an mroute // family goes to print_mroute, and the rest to print_route under // iproute_reset_filter's filter: every table, the family -4 or -6 picked, diff --git a/internal/nlmon/nlmon.go b/internal/nlmon/nlmon.go index 4e5734be7..c376503db 100644 --- a/internal/nlmon/nlmon.go +++ b/internal/nlmon/nlmon.go @@ -1,7 +1,7 @@ // Package nlmon is the monitor core the iproute2 clones share (goip's // `ip monitor` and its xfrm, genl and mptcp siblings, gotc's `tc monitor`): // lib/libnetlink.c's rtnl_listen and rtnl_from_file, lib/utils.c's -// print_timestamp, and the split of an nlmon capture into what a subscriber +// print_timestamp and print_nlmsg_timestamp, and the split of an nlmon capture into what a subscriber // was sent. // // Errors carry the tool's own text, so a clone prints err.Error() as the C @@ -287,6 +287,23 @@ func Timestamp(t time.Time, short bool) string { return fmt.Sprintf("Timestamp: %s %d usec\n", t.Format(asctimeLayoutCst), usec) } +// NlmsgTstampCst is NLMSG_TSTAMP (include/libnetlink.h), the record rtmon +// writes ahead of each batch in its file; `ip monitor` and `bridge monitor` +// print it. +const NlmsgTstampCst = 15 + +// TstampText is print_nlmsg_timestamp, an NLMSG_TSTAMP record's seconds and +// microseconds, two native u32s: asctime of the local time, then the +// microseconds as the u32 they are. The C reads both whatever the record's +// length; a short body reads as zeros here. +func TstampText(body []byte) string { + var w [8]byte + copy(w[:], body) + secs := int64(xtcpnl.NativeEndian().Uint32(w[0:4])) + usecs := xtcpnl.NativeEndian().Uint32(w[4:8]) + return fmt.Sprintf("Timestamp: %s %d us\n", time.Unix(secs, 0).Local().Format(asctimeLayoutCst), usecs) +} + // NowFunc is the clock a monitor stamps each message with: the instant the // environment variable env holds (RFC3339) when it parses, for a replay, // else the wall clock, read per message. diff --git a/internal/nlmon/nlmon_test.go b/internal/nlmon/nlmon_test.go index f896939c1..060a77445 100644 --- a/internal/nlmon/nlmon_test.go +++ b/internal/nlmon/nlmon_test.go @@ -298,6 +298,45 @@ func TestTimestamp(t *testing.T) { } } +// TestNlmonTstampText is print_nlmsg_timestamp: asctime of the record's +// seconds and its microseconds u32, printed whole. +// +// go test ./internal/nlmon/ -run TestNlmonTstampText +func TestNlmonTstampText(t *testing.T) { + t.Setenv("TZ", "UTC") + rec := func(secs, usecs uint32) []byte { + b := make([]byte, 8) + xtcpnl.NativeEndian().PutUint32(b[0:4], secs) + xtcpnl.NativeEndian().PutUint32(b[4:8], usecs) + return b + } + tests := []struct { + description string + body []byte + expected string + }{ + {"positive: seconds and microseconds", rec(1795600800, 7), "Timestamp: Wed Nov 25 10:00:00 2026 7 us\n"}, + {"positive: a longer body reads the first eight bytes", append(rec(0, 1), 0xff, 0xff), + "Timestamp: Thu Jan 1 00:00:00 1970 1 us\n"}, + {"negative: an empty body reads as zeros", nil, "Timestamp: Thu Jan 1 00:00:00 1970 0 us\n"}, + {"negative: a short body reads as zeros past its end", []byte{1}, "Timestamp: Thu Jan 1 00:00:01 1970 0 us\n"}, + {"boundary: the epoch", rec(0, 0), "Timestamp: Thu Jan 1 00:00:00 1970 0 us\n"}, + {"boundary: 2^31 seconds, past the 32-bit time_t rollover", rec(1<<31, 0), + "Timestamp: Tue Jan 19 03:14:08 2038 0 us\n"}, + {"boundary: the largest u32 seconds", rec(^uint32(0), 0), "Timestamp: Sun Feb 7 06:28:15 2106 0 us\n"}, + {"corner: microseconds past a second print as the u32 they are", rec(0, 999999999), + "Timestamp: Thu Jan 1 00:00:00 1970 999999999 us\n"}, + {"corner: the largest u32 microseconds", rec(0, ^uint32(0)), "Timestamp: Thu Jan 1 00:00:00 1970 4294967295 us\n"}, + } + for _, tc := range tests { + t.Run(tc.description, func(t *testing.T) { + if got := TstampText(tc.body); got != tc.expected { + t.Errorf("got %q, want %q", got, tc.expected) + } + }) + } +} + // TestNowFunc is the replay clock. // // go test ./internal/nlmon/ -run TestNowFunc diff --git a/nix/checks/default.nix b/nix/checks/default.nix index eda2f5dd7..2eda74868 100644 --- a/nix/checks/default.nix +++ b/nix/checks/default.nix @@ -116,6 +116,7 @@ in # settle wait goip-parity.exp runs after each Setup, on a fake sysfs. nlcap-wait-linkwatch = import ./nlcap-wait-linkwatch.nix { inherit pkgs; }; nlcap-tcmon = import ./nlcap-tcmon.nix { inherit pkgs; }; + nlcap-brmon-ws = import ./nlcap-brmon-ws.nix { inherit pkgs; }; # proto-lint: NOT in the default check set. `buf lint` reaches out to # buf.build for module deps (protovalidate, googleapis), which the hermetic # Nix sandbox blocks. Run `buf lint` directly from `nix develop`, where buf diff --git a/nix/checks/nlcap-brmon-ws.nix b/nix/checks/nlcap-brmon-ws.nix new file mode 100644 index 000000000..92315119b --- /dev/null +++ b/nix/checks/nlcap-brmon-ws.nix @@ -0,0 +1,147 @@ +# nix/checks/nlcap-brmon-ws.nix +# +# Hermetic check for `xtcp2-nl-brmon-ws` (nix/microvms/netlink-capture.nix), +# the helper the brmonitor workbench rows run `bridge monitor` under. It is +# xtcp2-nl-tcmon's helper with another readiness test: the monitor's socket +# is the /proc/net/netlink row whose Inode one of the monitor's own +# descriptors names, whatever its Groups column says, as a `vlan` or `vni` +# monitor binds none and a bare one ~RTMGRP_TC. The fake bridge +# (NLCAP_BRIDGE) "subscribes" by writing its socket line to a fake +# /proc/net/netlink (NLCAP_PROC_NETLINK) and an fd link to a fake +# /proc//fd (NLCAP_PROC), "listens" by writing a recvmsg to +# /proc//task//syscall, and prints what the trigger appends to an +# events file once it listens. Each row asserts the exit status, stdout and +# stderr. Whether bridge behaves as the fake does is what the workbench rows +# themselves record. +{ pkgs }: + +let + nlcap = import ../microvms/netlink-capture.nix { inherit pkgs; }; + fakeBridge = pkgs.writeShellScript "fake-bridge" '' + # fake-bridge : vlan | all | dumping | queued | elsewhere | + # stranger | never | trunc | die + proc=$NLCAP_PROC_NETLINK + task=$NLCAP_PROC/$$/task/$$ + fd=$NLCAP_PROC/$$/fd + # sub : a host socket on RTNLGRP_TC's + # bit and inode 7 that is never the monitor's, then the monitor's line. + sub() { + printf 'sk Eth Pid Groups Rmem Wmem Dump Locks Drops Inode\nffff0009 0 999 00000008 0 0 0 2 0 7\nffff0001 0 4242 %s %s 0 %s 2 0 %s\n' "$1" "$2" "$3" "$4" >"$proc" + } + # own : the monitor's descriptor 3 is that socket, as + # /proc//fd shows it, beside a pipe that is not a socket. + own() { + mkdir -p "$fd" + ln -sfn "socket:[$1]" "$fd/3" + ln -sfn "pipe:[55]" "$fd/1" + } + # sys : the one thread's syscall, as the kernel shows a blocked one. + sys() { + mkdir -p "$task" + echo "$1 0x3 0x7ffc0000 0x0 0x0 0x0 0x0 0x7ffc0000 0x7f0000000000" >"$task/syscall" + } + case $1 in + vlan) own 1234; sub 00000000 0 0 1234; sys 47 ;; + all) own 1234; sub fffffff7 0 0 1234; sys 47 ;; + dumping) own 1234; sub 00000000 0 1 1234; sys 47 ;; + queued) own 1234; sub 00000000 320 0 1234; sys 47 ;; + elsewhere) own 1234; sub 00000000 0 0 1234; sys 7 ;; + stranger) own 1234; sub 00000000 0 0 4321; sys 47 ;; + trunc) own 1234; sub fffffff7 0 0 1234; sys 47 ;; + never) ;; + die) echo 'Argument "a" is unknown, try "bridge monitor help".' >&2; exit 255 ;; + esac + seen=0 + while :; do + if [ -f "$EVENTS" ]; then + # The SIGTERM can land mid-substitution; wc then meets EPIPE. + n=$(wc -l <"$EVENTS" 2>/dev/null) + if [ "$n" -gt "$seen" ]; then + if [ "$1" = trunc ]; then + echo "Truncated message" >&2 + exit 2 + fi + tail -n +"$((seen + 1))" "$EVENTS" | head -n "$((n - seen))" + seen=$n + fi + fi + sleep 0.02 + done + ''; +in +pkgs.runCommand "xtcp2-nlcap-brmon-ws" + { + nativeBuildInputs = with pkgs; [ + bash + coreutils + gnugrep + nlcap.brmonws + ]; + } + '' + bash ${pkgs.writeText "brmon-ws-test.bash" '' + set -u + fails=0 + work=$(mktemp -d) + export NLCAP_PROC_NETLINK=$work/netlink NLCAP_PROC=$work/proc NLCAP_RECVMSG_NR=47 \ + NLCAP_BRIDGE=${fakeBridge} EVENTS=$work/events + out=$work/out + err=$work/err + + # row + # An ERE of - wants the stream empty. + row() { + local category=$1 desc=$2 want_rc=$3 want_out=$4 want_err=$5 rc ok=1 + shift 5 + : >"$NLCAP_PROC_NETLINK" + rm -rf "$EVENTS" "$NLCAP_PROC" + rc=0 + xtcp2-nl-brmon-ws "$@" >"$out" 2>"$err" || rc=$? + [ "$rc" -eq "$want_rc" ] || ok=0 + if [ "$want_out" = - ]; then [ ! -s "$out" ] || ok=0; else grep -Eq -- "$want_out" "$out" || ok=0; fi + if [ "$want_err" = - ]; then [ ! -s "$err" ] || ok=0; else grep -Eq -- "$want_err" "$err" || ok=0; fi + if [ "$ok" -eq 1 ]; then + echo "ok $category: $desc (rc=$rc)" + else + echo "FAIL $category: $desc: rc=$rc (want $want_rc); stdout (want /$want_out/):" + cat "$out" + echo "stderr (want /$want_err/):" + cat "$err" + fails=$((fails + 1)) + fi + } + + row positive "a vlan monitor bound to no group is found by its inode" 0 '^vlan 10 dev p0$' - \ + vlan "echo 'vlan 10 dev p0' >>$EVENTS" '^vlan 10' + row positive "a bare or all monitor, ~RTMGRP_TC, two events waited for" 0 '^Deleted 00:00:00:00:00:01' - \ + all "echo '00:00:00:00:00:01 dev p0 master br0' >>$EVENTS; echo 'Deleted 00:00:00:00:00:01 dev p0 master br0' >>$EVENTS" '^00:' '^Deleted' + row negative "a monitor whose link dump never ends is not ready" 1 - 'never finished its link dump' \ + dumping "echo x >>$EVENTS" x + row boundary "a reply still queued (Rmem 320) is not ready" 1 - 'never finished its link dump' \ + queued "echo x >>$EVENTS" x + row corner "a monitor blocked in another syscall than recvmsg is not ready" 1 - 'never finished its link dump' \ + elsewhere "echo x >>$EVENTS" x + row negative "a socket on RTNLGRP_TC's bit that is not the monitor's is not it" 1 - 'never subscribed' \ + stranger "echo x >>$EVENTS" x + row negative "a monitor that never subscribes" 1 - 'never subscribed' \ + never "echo x >>$EVENTS" x + row negative "a failing trigger is shown, with its output" 1 - 'the trigger failed: boom' \ + vlan "echo boom; false" + row negative "an event that never comes" 1 - 'no match for .never' \ + vlan "true" '^never$' + row boundary "a monitor that ends by itself passes its status on" 2 - '^Truncated message$' \ + trunc "echo big >>$EVENTS" 'Truncated message' + row boundary "and needs no ERE" 2 - '^Truncated message$' \ + trunc "echo big >>$EVENTS" + row corner "a monitor refusing its arguments exits with its own status, no complaint" 255 - '^Argument "a" is unknown' \ + die "true" + row corner "usage: fewer than two arguments" 2 - '^usage: xtcp2-nl-brmon-ws ' monitor + + rm -rf "$work" + if [ "$fails" -ne 0 ]; then + echo "$fails row(s) failed" + exit 1 + fi + ''} + touch $out + '' diff --git a/nix/microvms/netlink-capture.nix b/nix/microvms/netlink-capture.nix index 06fee00b0..b98907f2d 100644 --- a/nix/microvms/netlink-capture.nix +++ b/nix/microvms/netlink-capture.nix @@ -10,7 +10,7 @@ # # This exports ONE thing: `xtcp2-nlcap`, a helper installed on the guest's # PATH (with `xtcp2-nl-mcdump`, `xtcp2-nl-ipmon`, `xtcp2-nl-brmon`, -# `xtcp2-nl-tcmon`, `xtcp2-nl-xfrmmon`, `xtcp2-nl-espinudp`, `xtcp2-nl-ra`, `xtcp2-nl-tcp`, +# `xtcp2-nl-brmon-ws`, `xtcp2-nl-tcmon`, `xtcp2-nl-xfrmmon`, `xtcp2-nl-espinudp`, `xtcp2-nl-ra`, `xtcp2-nl-tcp`, # `xtcp2-nl-ioam` and `xtcp2-nl-mptcp`, below, on its own PATH) # and invoked one subcommand at a time by a host driver # (nix/microvms/scripts/capture-netlink-dumps.exp, goip-parity.exp, @@ -495,144 +495,210 @@ let # stdout, stderr the monitor's stderr then the helper's own complaints. # A monitor that never subscribes or never finishes its dump, a failed # trigger or a timeout exits 1; a usage error exits 2. - tcmon = pkgs.writeShellApplication { - name = "xtcp2-nl-tcmon"; - runtimeInputs = with pkgs; [ - bash - coreutils - gawk - gnugrep - iproute2 - ]; - text = '' - [ $# -ge 2 ] || { - echo "usage: xtcp2-nl-tcmon [until-ERE...]" >&2 - exit 2 - } - read -ra tc_args <<<"$1" - trigger=$2 - shift 2 - proc=''${NLCAP_PROC_NETLINK:-/proc/net/netlink} - procdir=''${NLCAP_PROC:-/proc} - tc=''${NLCAP_TC:-tc} - nr=''${NLCAP_RECVMSG_NR:-} - if [ -z "$nr" ]; then - case $(uname -m) in - x86_64) nr=47 ;; - aarch64) nr=212 ;; - *) - echo "xtcp2-nl-tcmon: no recvmsg number for $(uname -m); set NLCAP_RECVMSG_NR" >&2 - exit 2 - ;; - esac - fi + mkMonHelper = + { + name, + tool, + toolEnv, + argsName, + sockMatch, + sockPrelude ? "", + sockAwkArgs ? "", + sockBegin ? "", + }: + pkgs.writeShellApplication { + inherit name; + runtimeInputs = with pkgs; [ + bash + coreutils + gawk + gnugrep + iproute2 + ]; + text = '' + [ $# -ge 2 ] || { + echo "usage: ${name} ${argsName} [until-ERE...]" >&2 + exit 2 + } + read -ra tool_args <<<"$1" + trigger=$2 + shift 2 + proc=''${NLCAP_PROC_NETLINK:-/proc/net/netlink} + procdir=''${NLCAP_PROC:-/proc} + tool=''${${toolEnv}:-${tool}} + nr=''${NLCAP_RECVMSG_NR:-} + if [ -z "$nr" ]; then + case $(uname -m) in + x86_64) nr=47 ;; + aarch64) nr=212 ;; + *) + echo "${name}: no recvmsg number for $(uname -m); set NLCAP_RECVMSG_NR" >&2 + exit 2 + ;; + esac + fi - out=$(mktemp) - err=$(mktemp) - tout=$(mktemp) - trap 'rm -f "$out" "$err" "$tout"' EXIT - "$tc" "''${tc_args[@]}" >"$out" 2>"$err" & - mpid=$! + out=$(mktemp) + err=$(mktemp) + tout=$(mktemp) + trap 'rm -f "$out" "$err" "$tout"' EXIT + "$tool" "''${tool_args[@]}" >"$out" 2>"$err" & + mpid=$! + + # wait_match : poll the monitor's stdout and stderr, + # giving up early once the monitor has ended. + wait_match() { + local i + for ((i = 0; i < $2 * 2; i++)); do + grep -Eq -- "$1" "$out" "$err" && return 0 + kill -0 "$mpid" 2>/dev/null || { + grep -Eq -- "$1" "$out" "$err" + return + } + sleep 0.05 + done + return 1 + } - # wait_match : poll the monitor's stdout and stderr, - # giving up early once the monitor has ended. - wait_match() { - local i - for ((i = 0; i < $2 * 2; i++)); do - grep -Eq -- "$1" "$out" "$err" && return 0 - kill -0 "$mpid" 2>/dev/null || { - grep -Eq -- "$1" "$out" "$err" - return - } + ${sockPrelude} + # sock_state: "listening" for the monitor's socket with no dump + # running and nothing queued, "subscribed" for it otherwise, else + # nothing. Columns: sk Eth Pid Groups Rmem Wmem Dump Locks Drops Inode. + sock_state() { + awk ${sockAwkArgs}'${sockBegin}${sockMatch} { + s = ($5 == 0 && $7 == 0) ? "listening" : "subscribed" + } + END { print s }' "$proc" + } + # in_recvmsg: a thread of the monitor is blocked in recvmsg(2). + in_recvmsg() { + local f n + for f in "$procdir/$mpid"/task/*/syscall; do + read -r n _ 2>/dev/null <"$f" || continue + [ "$n" = "$nr" ] && return 0 + done + return 1 + } + + ready=0 + subscribed=0 + for _ in $(seq 1 100); do + case $(sock_state) in + listening) + subscribed=1 + if in_recvmsg; then + ready=1 + break + fi + ;; + subscribed) subscribed=1 ;; + esac + kill -0 "$mpid" 2>/dev/null || break sleep 0.05 done - return 1 - } - # sock_state: "listening" for the monitor's socket with no dump - # running and nothing queued, "subscribed" for it otherwise, else - # nothing. Columns: sk Eth Pid Groups Rmem Wmem Dump ... - sock_state() { - awk '$2 == 0 && and(strtonum("0x" $4), 8) { - s = ($5 == 0 && $7 == 0) ? "listening" : "subscribed" - } - END { print s }' "$proc" - } - # in_recvmsg: a thread of the monitor is blocked in recvmsg(2). - in_recvmsg() { - local f n - for f in "$procdir/$mpid"/task/*/syscall; do - read -r n _ 2>/dev/null <"$f" || continue - [ "$n" = "$nr" ] && return 0 - done - return 1 - } - - ready=0 - subscribed=0 - for _ in $(seq 1 100); do - case $(sock_state) in - listening) - subscribed=1 - if in_recvmsg; then - ready=1 - break + rc=0 + complaints=() + if [ "$ready" -ne 1 ]; then + if kill -0 "$mpid" 2>/dev/null; then + if [ "$subscribed" -eq 1 ]; then + complaints+=("${name}: the monitor never finished its link dump") + else + complaints+=("${name}: the monitor never subscribed") fi - ;; - subscribed) subscribed=1 ;; - esac - kill -0 "$mpid" 2>/dev/null || break - sleep 0.05 - done - - rc=0 - complaints=() - if [ "$ready" -ne 1 ]; then - if kill -0 "$mpid" 2>/dev/null; then - if [ "$subscribed" -eq 1 ]; then - complaints+=("xtcp2-nl-tcmon: the monitor never finished its link dump") - else - complaints+=("xtcp2-nl-tcmon: the monitor never subscribed") fi - fi - rc=1 - else - if ! bash -c "$trigger" >"$tout" 2>&1; then - complaints+=("xtcp2-nl-tcmon: the trigger failed: $(cat "$tout")") rc=1 - fi - for re in "$@"; do - if ! wait_match "$re" 100; then - complaints+=("xtcp2-nl-tcmon: no match for $re") + else + if ! bash -c "$trigger" >"$tout" 2>&1; then + complaints+=("${name}: the trigger failed: $(cat "$tout")") rc=1 fi - done - # With no ERE, the row expects the monitor to end by itself: give - # it the same 10 s. - if [ $# -eq 0 ]; then - for _ in $(seq 1 200); do - kill -0 "$mpid" 2>/dev/null || break - sleep 0.05 + for re in "$@"; do + if ! wait_match "$re" 100; then + complaints+=("${name}: no match for $re") + rc=1 + fi done + # With no ERE, the row expects the monitor to end by itself: give + # it the same 10 s. + if [ $# -eq 0 ]; then + for _ in $(seq 1 200); do + kill -0 "$mpid" 2>/dev/null || break + sleep 0.05 + done + fi fi - fi - if kill -0 "$mpid" 2>/dev/null; then - kill -TERM "$mpid" 2>/dev/null || true - wait "$mpid" 2>/dev/null || true - else - mrc=0 - wait "$mpid" || mrc=$? - rc=$mrc - fi - cat "$out" - cat "$err" >&2 - if [ ''${#complaints[@]} -gt 0 ]; then - printf '%s\n' "''${complaints[@]}" >&2 - [ "$rc" -ne 0 ] || rc=1 - fi - exit "$rc" + if kill -0 "$mpid" 2>/dev/null; then + kill -TERM "$mpid" 2>/dev/null || true + wait "$mpid" 2>/dev/null || true + else + mrc=0 + wait "$mpid" || mrc=$? + rc=$mrc + fi + cat "$out" + cat "$err" >&2 + if [ ''${#complaints[@]} -gt 0 ]; then + printf '%s\n' "''${complaints[@]}" >&2 + [ "$rc" -ne 0 ] || rc=1 + fi + exit "$rc" + ''; + }; + + # xtcp2-nl-tcmon [until-ERE...]: the tcmonitor rows' + # helper, described above; ready is its socket on RTNLGRP_TC's bit 0x8. + tcmon = mkMonHelper { + name = "xtcp2-nl-tcmon"; + tool = "tc"; + toolEnv = "NLCAP_TC"; + argsName = ""; + sockMatch = ''$2 == 0 && and(strtonum("0x" $4), 8)''; + }; + + # xtcp2-nl-brmon-ws [until-ERE...] + # + # `bridge ` (a `monitor`, with any global options ahead of + # it) in the background while runs, for the brmonitor workbench + # rows (docs/netlink/gobridge-status.md, 25C), the same helper as + # xtcp2-nl-tcmon with another readiness test. It is not xtcp2-nl-brmon, + # whose VLAN canary the BIRD captures keep. + # + # bridge_monitor's socket is not found by a group bit: a bare monitor and + # `all` bind ~RTMGRP_TC, which clears 0x8, and a `vlan` or `vni` monitor + # binds no group at all and joins RTNLGRP_BRVLAN (33) or RTNLGRP_TUNNEL + # (35) with a setsockopt, past the 32 bits /proc/net/netlink shows. So the + # monitor's socket is the NETLINK_ROUTE row whose Inode is one of the + # monitor's own descriptors (/proc//fd/* reading socket:[N]); bridge + # closes its startup socket in do_monitor and opens the monitor's, so it + # holds one. Ready is then, as for tc, Dump 0 and Rmem 0 (ll_init_map's + # link dump over) and a thread blocked in recvmsg(2). NLCAP_BRIDGE names + # the monitor binary for the hermetic check (nix/checks/nlcap-brmon-ws.nix), + # whose fake writes the fd links under NLCAP_PROC. + brmonws = mkMonHelper { + name = "xtcp2-nl-brmon-ws"; + tool = "bridge"; + toolEnv = "NLCAP_BRIDGE"; + argsName = ""; + sockPrelude = '' + # mon_inodes: the inodes of the monitor's sockets, space-separated. + mon_inodes() { + local f l + for f in "$procdir/$mpid"/fd/*; do + l=$(readlink "$f" 2>/dev/null) || continue + case $l in + "socket:["*"]") + l=''${l#socket:[} + printf '%s ' "''${l%]}" + ;; + esac + done + } ''; + sockAwkArgs = ''-v inodes="$(mon_inodes)" ''; + sockBegin = ''BEGIN { n = split(inodes, a, " "); for (i = 1; i <= n; i++) mine[a[i]] = 1 } ''; + sockMatch = ''$2 == 0 && ($10 in mine)''; }; # xtcp2-nl-brmon ... @@ -1325,6 +1391,7 @@ pkgs.writeShellApplication { inherit ipmon brmon + brmonws tcmon xfrmmon espinudp @@ -1338,6 +1405,7 @@ pkgs.writeShellApplication { mcdump ipmon brmon + brmonws tcmon xfrmmon espinudp diff --git a/nix/microvms/workbench/brmonitor.rows.jsonl b/nix/microvms/workbench/brmonitor.rows.jsonl new file mode 100644 index 000000000..9d4008808 --- /dev/null +++ b/nix/microvms/workbench/brmonitor.rows.jsonl @@ -0,0 +1,47 @@ +# Generated by `nlcapgen matrix -family brmonitor -seed 1 -random 0`. +# Do not edit; regenerate. tools/nlcapgen/matrix.go explains the strategies. +# 44 rows. +{"id":"brmonitor/ec-001","desc":"positive: cmd=link:live:monitor_link","cmd":"xtcp2-nl-brmon-ws 'monitor link' 'ip link set d3 master br0 && bridge link set dev d3 cost 9 && ip link set d3 nomaster && sleep 1.5 && ip link add mk0 address 02:00:00:00:01:0f type dummy' 'mk0'","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"link","mode":"live","trigger":"ip link set d3 master br0 && bridge link set dev d3 cost 9 && ip link set d3 nomaster && sleep 1.5 && ip link add mk0 address 02:00:00:00:01:0f type dummy","until":"mk0","words":"monitor link"}} +{"id":"brmonitor/ec-002","desc":"positive: cmd=fdb:live:monitor_fdb","cmd":"xtcp2-nl-brmon-ws 'monitor fdb' 'bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10 && bridge fdb replace 02:00:00:00:0a:01 dev d2 master static vlan 10 && bridge fdb del 02:00:00:00:0a:01 dev d2 master vlan 10 && ip neigh add 192.0.2.5 lladdr 02:00:00:00:0a:05 dev br0 && sleep 1.5 && bridge fdb add 02:00:00:00:0f:ff dev d1 master static vlan 10' '0f:ff'","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"fdb","mode":"live","trigger":"bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10 && bridge fdb replace 02:00:00:00:0a:01 dev d2 master static vlan 10 && bridge fdb del 02:00:00:00:0a:01 dev d2 master vlan 10 && ip neigh add 192.0.2.5 lladdr 02:00:00:00:0a:05 dev br0 && sleep 1.5 && bridge fdb add 02:00:00:00:0f:ff dev d1 master static vlan 10","until":"0f:ff","words":"monitor fdb"}} +{"id":"brmonitor/ec-003","desc":"positive: cmd=fdbvx:live:monitor_fdb","cmd":"xtcp2-nl-brmon-ws 'monitor fdb' 'bridge fdb add 00:00:00:00:00:00 dev vx0 dst 192.0.2.1 && bridge fdb append 00:00:00:00:00:00 dev vx0 dst 192.0.2.2 port 4790 vni 200 && bridge fdb del 00:00:00:00:00:00 dev vx0 dst 192.0.2.1 && sleep 1.5 && bridge fdb add 02:00:00:00:0f:ff dev vx0 dst 192.0.2.9' '0f:ff'","pre":["ip link add d5 address 02:00:00:00:01:05 type dummy && ip link set d5 addrgenmode none && ip link set d5 up && ip addr add 192.0.2.10/24 dev d5","ip link add vx0 address 02:00:00:00:01:10 type vxlan id 100 dstport 4789 local 192.0.2.10 nolearning && ip link set vx0 addrgenmode none && ip link set vx0 up","sleep 1.5"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"fdbvx","mode":"live","trigger":"bridge fdb add 00:00:00:00:00:00 dev vx0 dst 192.0.2.1 && bridge fdb append 00:00:00:00:00:00 dev vx0 dst 192.0.2.2 port 4790 vni 200 && bridge fdb del 00:00:00:00:00:00 dev vx0 dst 192.0.2.1 && sleep 1.5 && bridge fdb add 02:00:00:00:0f:ff dev vx0 dst 192.0.2.9","until":"0f:ff","words":"monitor fdb"}} +{"id":"brmonitor/ec-004","desc":"positive: cmd=mdb:live:monitor_mdb","cmd":"xtcp2-nl-brmon-ws 'monitor mdb' 'bridge mdb add dev br0 port d1 grp 239.1.1.1 permanent vid 10 && bridge mdb add dev br0 port d2 grp ff0e::1 permanent vid 10 && bridge mdb add dev br0 port d2 grp 01:02:03:04:05:06 permanent vid 10 && bridge mdb replace dev br0 port d1 grp 239.1.1.1 permanent vid 10 && bridge mdb del dev br0 port d1 grp 239.1.1.1 vid 10 && bridge link set dev d2 mcast_router 2 && sleep 1.5 && bridge mdb add dev br0 port d1 grp 239.9.9.9 permanent vid 10' '239\\.9\\.9\\.9'","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none && ip link set br0 type bridge mcast_igmp_version 3 mcast_mld_version 2 && echo 1 > /proc/sys/net/ipv6/conf/br0/disable_ipv6","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10 && bridge vlan add dev br0 vid 10 self","sleep 1.5"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"mdb","mode":"live","trigger":"bridge mdb add dev br0 port d1 grp 239.1.1.1 permanent vid 10 && bridge mdb add dev br0 port d2 grp ff0e::1 permanent vid 10 && bridge mdb add dev br0 port d2 grp 01:02:03:04:05:06 permanent vid 10 && bridge mdb replace dev br0 port d1 grp 239.1.1.1 permanent vid 10 && bridge mdb del dev br0 port d1 grp 239.1.1.1 vid 10 && bridge link set dev d2 mcast_router 2 && sleep 1.5 && bridge mdb add dev br0 port d1 grp 239.9.9.9 permanent vid 10","until":"239\\.9\\.9\\.9","words":"monitor mdb"}} +{"id":"brmonitor/ec-005","desc":"positive: cmd=vlan:live:monitor_vlan","cmd":"xtcp2-nl-brmon-ws 'monitor vlan' 'bridge vlan add dev d1 vid 20 && bridge vlan add dev d2 vid 30-32 && bridge vlan del dev d1 vid 20 && bridge vlan global set dev br0 vid 10 mcast_igmp_version 3 && sleep 1.5 && bridge vlan add dev d2 vid 3999' '3999'","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","ip link set br0 type bridge mcast_vlan_snooping 1","sleep 1.5"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"vlan","mode":"live","trigger":"bridge vlan add dev d1 vid 20 && bridge vlan add dev d2 vid 30-32 && bridge vlan del dev d1 vid 20 && bridge vlan global set dev br0 vid 10 mcast_igmp_version 3 && sleep 1.5 && bridge vlan add dev d2 vid 3999","until":"3999","words":"monitor vlan"}} +{"id":"brmonitor/ec-006","desc":"positive: cmd=vni:live:monitor_vni","cmd":"xtcp2-nl-brmon-ws 'monitor vni' 'bridge vni add dev vx1 vni 500 && bridge vni add dev vx1 vni 600-602 && bridge vni del dev vx1 vni 500 && sleep 1.5 && bridge vni add dev vx1 vni 999999' '999999'","pre":["ip link add d9 address 02:00:00:00:01:09 type dummy && ip link set d9 addrgenmode none && ip link set d9 up","ip link add vx1 address 02:00:00:00:01:11 type vxlan external vnifilter dstport 4790 dev d9 && ip link set vx1 addrgenmode none","bridge vni add dev vx1 vni 100","sleep 1.5"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"vni","mode":"live","trigger":"bridge vni add dev vx1 vni 500 && bridge vni add dev vx1 vni 600-602 && bridge vni del dev vx1 vni 500 && sleep 1.5 && bridge vni add dev vx1 vni 999999","until":"999999","words":"monitor vni"}} +{"id":"brmonitor/ec-007","desc":"positive: cmd=fdbvlan:live:monitor_fdb_vlan","cmd":"xtcp2-nl-brmon-ws 'monitor fdb vlan' 'bridge vlan add dev d1 vid 20 && bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10 && sleep 1.5 && bridge vlan add dev d2 vid 3999' '3999'","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"fdbvlan","mode":"live","trigger":"bridge vlan add dev d1 vid 20 && bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10 && sleep 1.5 && bridge vlan add dev d2 vid 3999","until":"3999","words":"monitor fdb vlan"}} +{"id":"brmonitor/ec-008","desc":"corner: cmd=bare:live:monitor","cmd":"xtcp2-nl-brmon-ws 'monitor' 'bridge vlan add dev d1 vid 20 && sleep 1.5 && bridge fdb add 02:00:00:00:0f:ff dev d1 master static vlan 10' '0f:ff'","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"bare","mode":"live","trigger":"bridge vlan add dev d1 vid 20 && sleep 1.5 && bridge fdb add 02:00:00:00:0f:ff dev d1 master static vlan 10","until":"0f:ff","words":"monitor"}} +{"id":"brmonitor/ec-009","desc":"corner: cmd=all:live:monitor_all","cmd":"xtcp2-nl-brmon-ws 'monitor all' 'bridge vlan add dev d1 vid 20 && sleep 1.5 && bridge fdb add 02:00:00:00:0f:ff dev d1 master static vlan 10' '0f:ff'","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"all","mode":"live","trigger":"bridge vlan add dev d1 vid 20 && sleep 1.5 && bridge fdb add 02:00:00:00:0f:ff dev d1 master static vlan 10","until":"0f:ff","words":"monitor all"}} +{"id":"brmonitor/ec-010","desc":"corner: cmd=alllink:live:monitor_all_link","cmd":"xtcp2-nl-brmon-ws 'monitor all link' 'bridge vlan add dev d1 vid 20 && bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10 && sleep 1.5 && ip link add mk0 address 02:00:00:00:01:0f type dummy' 'mk0'","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"alllink","mode":"live","trigger":"bridge vlan add dev d1 vid 20 && bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10 && sleep 1.5 && ip link add mk0 address 02:00:00:00:01:0f type dummy","until":"mk0","words":"monitor all link"}} +{"id":"brmonitor/ec-011","desc":"corner: cmd=linkall:live:monitor_link_all","cmd":"xtcp2-nl-brmon-ws 'monitor link all' 'bridge vlan add dev d1 vid 20 && bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10 && sleep 1.5 && ip link add mk0 address 02:00:00:00:01:0f type dummy' 'mk0'","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"linkall","mode":"live","trigger":"bridge vlan add dev d1 vid 20 && bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10 && sleep 1.5 && ip link add mk0 address 02:00:00:00:01:0f type dummy","until":"mk0","words":"monitor link all"}} +{"id":"brmonitor/ec-012","desc":"corner: cmd=prefix:live:monitor_v","cmd":"xtcp2-nl-brmon-ws 'monitor v' 'bridge vlan add dev d1 vid 20 && sleep 1.5 && bridge vlan add dev d2 vid 3999' '3999'","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"prefix","mode":"live","trigger":"bridge vlan add dev d1 vid 20 && sleep 1.5 && bridge vlan add dev d2 vid 3999","until":"3999","words":"monitor v"}} +{"id":"brmonitor/ec-013","desc":"corner: cmd=prefix:live:monitor_fd","cmd":"xtcp2-nl-brmon-ws 'monitor fd' 'bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10 && sleep 1.5 && bridge fdb add 02:00:00:00:0f:ff dev d1 master static vlan 10' '0f:ff'","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"prefix","mode":"live","trigger":"bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10 && sleep 1.5 && bridge fdb add 02:00:00:00:0f:ff dev d1 master static vlan 10","until":"0f:ff","words":"monitor fd"}} +{"id":"brmonitor/ec-014","desc":"corner: cmd=netdev:live:monitor_link","cmd":"xtcp2-nl-brmon-ws 'monitor link' 'ip link set d3 mtu 1400 && ip link set d3 down && sleep 1.5 && ip link add mk0 address 02:00:00:00:01:0f type dummy' 'mk0'","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"netdev","mode":"live","trigger":"ip link set d3 mtu 1400 && ip link set d3 down && sleep 1.5 && ip link add mk0 address 02:00:00:00:01:0f type dummy","until":"mk0","words":"monitor link"}} +{"id":"brmonitor/ec-015","desc":"corner: cmd=stamp:live:-t_monitor_fdb","cmd":"xtcp2-nl-brmon-ws '-t monitor fdb' 'bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10 && sleep 1.5 && bridge fdb add 02:00:00:00:0f:ff dev d1 master static vlan 10' '0f:ff'","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"stamp","mode":"live","trigger":"bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10 && sleep 1.5 && bridge fdb add 02:00:00:00:0f:ff dev d1 master static vlan 10","until":"0f:ff","words":"-t monitor fdb"}} +{"id":"brmonitor/ec-016","desc":"corner: cmd=json:live:-j_monitor_fdb","cmd":"xtcp2-nl-brmon-ws '-j monitor fdb' 'bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10 && sleep 1.5 && bridge fdb add 02:00:00:00:0f:ff dev d1 master static vlan 10' '0f:ff'","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"json","mode":"live","trigger":"bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10 && sleep 1.5 && bridge fdb add 02:00:00:00:0f:ff dev d1 master static vlan 10","until":"0f:ff","words":"-j monitor fdb"}} +{"id":"brmonitor/ec-017","desc":"positive: cmd=details:live:-d_monitor_link","cmd":"xtcp2-nl-brmon-ws '-d monitor link' 'ip link set d3 master br0 && bridge link set dev d3 cost 9 && ip link set d3 nomaster && sleep 1.5 && ip link add mk0 address 02:00:00:00:01:0f type dummy' 'mk0'","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"details","mode":"live","trigger":"ip link set d3 master br0 && bridge link set dev d3 cost 9 && ip link set d3 nomaster && sleep 1.5 && ip link add mk0 address 02:00:00:00:01:0f type dummy","until":"mk0","words":"-d monitor link"}} +{"id":"brmonitor/ec-018","desc":"positive: cmd=stats:live:-s_monitor_vlan","cmd":"xtcp2-nl-brmon-ws '-s monitor vlan' 'bridge vlan add dev d1 vid 20 && sleep 1.5 && bridge vlan add dev d2 vid 3999' '3999'","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","ip link set br0 type bridge mcast_vlan_snooping 1","sleep 1.5"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"stats","mode":"live","trigger":"bridge vlan add dev d1 vid 20 && sleep 1.5 && bridge vlan add dev d2 vid 3999","until":"3999","words":"-s monitor vlan"}} +{"id":"brmonitor/ec-019","desc":"positive: cmd=file:monitor_file_m.bin","cmd":"bridge monitor file m.bin","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5","echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAA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AAEAOAABAAQAAAABAAoA7wEBAQAAAAAAAAAAAAAAAAgAAAAIAAEAAAAAAAUABQAEAAAABQADAAAAAAAkAAAAVAAAAAAAAAAAAAAABwAAAAMAAAAMAAIACAABAAUAAABUAAAAcAAAAAAAAAAAAAAABwAAAAQAAAA8AAGACAABAAAAFAAFAAMAAwAAAAUACQAAAAAABQAKAAAAAAAFAAYAAQAAAAgABwAAAAAACAAIAAAAAABcAAAAcAAAAAAAAAAAAAAABwAAAAUAAABEAAGACAABAAAAHgAGAAIAIAAAAAUAAwADAAAABQAJAAAAAAAFAAoAAAAAAAUABgABAAAACAAHAAAAAAAIAAgAAAAAACQAAABxAAAAAAAAAAAAAAAHAAAABAAAAAwAAYAIAAEAAAAUAKQAAABwAAAAAAAAAAAAAAAHAAAAAwAAAIwAAoAGAAEACgAAAAUAAwABAAAABQAEAAMAAAAIAAYAAgAAAAgABwACAAAABQAPAAAAAAAMAAgAZAAAAAAAAAAMAAoAkGUAAAAAAAAMAAsAnGMAAAAAAAAMAAwA1DAAAAAAAAAMAA0A6AMAAAAAAAAMAA4ANQwAAAAAAAAFAAUAAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"file","mode":"file","words":"monitor file m.bin"}} +{"id":"brmonitor/ec-020","desc":"corner: cmd=file:monitor_file_m.bin_link","cmd":"bridge monitor file m.bin link","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5","echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAAoAAAAAAAUADAAAAAAADAANAIAAAgAAAAEADAAOAIAAAgAAAAEABgAPAAOAAAAGABAAAAAAAAYAEQADgAAABgASAAMAAAAFABMAAAAAAAUAFAAAAAAABQAdAAAAAAAGAB8AAAAAAAUAIAAAAAAABQAjAAAAAAAFACQAAAAAAAUAIQAAAAAABQAnAAAAAAAFACgAAAAAAAUAKwAAAAAABQAtAAAAAAAMABUAAAAAAAAAAAAMABYA2wUAAAAAAAAMABcAAAAAAAAAAAAFABkAAQAAAAgAJQAAAgAACAAmAAAAAAAIACkAAAAAAAgAKgAAAAAADAAaAAgAAgAGAAEAzAUAABAAAAAAAAAAAAAAAAAAAQAHAAAAggAAAP////8IAAMAbWswAAgADQDoAwAABQAQAAIAAAAFABEAAAAAAAUAQwAAAAAACAAEANwFAAAIADIAAAAAAAgAMwAAAAAACAAbAAAAAAAIAB4AAAAAAAgAPQAAAAAACAAfAAEAAAAIACgA//8AAAgAKQAAAAEACAA6AAAAAQAIAD8AAAABAAgAQAAAAAEACAA7AAAAAQAIADwA//8AAAgAQgAAAAAACAAgAAEAAAAFACEAAQAAAAgAIwAAAAAACAAvAAAAAAAIADAAAAAAAAYARAAAAAAABgBFAAAAAAAFACcAAAAAAAoAAQACAAAAAQ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AAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"file","mode":"file","words":"monitor file m.bin link"}} +{"id":"brmonitor/ec-021","desc":"corner: cmd=file:monitor_file_m.bin_all","cmd":"bridge monitor file m.bin all","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5","echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAAoAAAAAAAUADAAAAAAADAANAIAAAgAAAAEADAAOAIAAAgAAAAEABgAPAAOAAAAGABAAAAAAAAYAEQADgAAABgASAAMAAAAFABMAAAAAAAUAFAAAAAAABQAdAAAAAAAGAB8AAAAAAAUAIAAAAAAABQAjAAAAAAAFACQAAAAAAAUAIQAAAAAABQAnAAAAAAAFACgAAAAAAAUAKwAAAAAABQAtAAAAAAAMABUAAAAAAAAAAAAMABYA2wUAAAAAAAAMABcAAAAAAAAAAAAFABkAAQAAAAgAJQAAAgAACAAmAAAAAAAIACkAAAAAAAgAKgAAAAAADAAaAAgAAgAGAAEAzAUAABAAAAAAAAAAAAA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IwAAoAGAAEACgAAAAUAAwABAAAABQAEAAMAAAAIAAYAAgAAAAgABwACAAAABQAPAAAAAAAMAAgAZAAAAAAAAAAMAAoAkGUAAAAAAAAMAAsAnGMAAAAAAAAMAAwA1DAAAAAAAAAMAA0A6AMAAAAAAAAMAA4ANQwAAAAAAAAFAAUAAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"file","mode":"file","words":"monitor file m.bin all"}} +{"id":"brmonitor/ec-022","desc":"corner: cmd=file:-t_monitor_file_m.bin","cmd":"bridge -t monitor file m.bin","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5","echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAAoAAAAAAAUADAAAAAAADAANAIAAA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AAAMAAIACAABAAUAAABUAAAAcAAAAAAAAAAAAAAABwAAAAQAAAA8AAGACAABAAAAFAAFAAMAAwAAAAUACQAAAAAABQAKAAAAAAAFAAYAAQAAAAgABwAAAAAACAAIAAAAAABcAAAAcAAAAAAAAAAAAAAABwAAAAUAAABEAAGACAABAAAAHgAGAAIAIAAAAAUAAwADAAAABQAJAAAAAAAFAAoAAAAAAAUABgABAAAACAAHAAAAAAAIAAgAAAAAACQAAABxAAAAAAAAAAAAAAAHAAAABAAAAAwAAYAIAAEAAAAUAKQAAABwAAAAAAAAAAAAAAAHAAAAAwAAAIwAAoAGAAEACgAAAAUAAwABAAAABQAEAAMAAAAIAAYAAgAAAAgABwACAAAABQAPAAAAAAAMAAgAZAAAAAAAAAAMAAoAkGUAAAAAAAAMAAsAnGMAAAAAAAAMAAwA1DAAAAAAAAAMAA0A6AMAAAAAAAAMAA4ANQwAAAAAAAAFAAUAAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"file","mode":"file","words":"-t monitor file m.bin"}} +{"id":"brmonitor/ec-023","desc":"corner: cmd=file:-j_monitor_file_m.bin","cmd":"bridge -j monitor file m.bin","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5","echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAAoAAAAAAAUADAAAAAAADAANAIAAAgAAAAEADAAOAIAAAgAAAAEABgAPAAOAAAAGABAAAAAAAAYAEQADgAAABgASAAMAAAAFABMAAAAAAAUAFAAAAAAABQAdAAAAAAAGAB8AAAAAAAUAIAAAAAAABQAjAAAAAAAFACQAAAAAAAUAIQAAAAAABQAnAAAAAAAFACgAAAAAAAUAKwAAAAAABQAtAAAAAAAMABUAAAAAAAAAAAAMABYA2wUAAAAAAAAMABcAAAAAAAAAAAAFABkAAQAAAAgAJQAAAgAACAAmAAAAAAAIACkAAAAAAAgAKgAAAAAADAAaAAgAAgAGAAEAzAUAABAAAAAAAAAAAAAAAAAAAQAHAAAAggAAAP////8IAAMAbWswAAgADQDoAwAABQAQAAIAAAAFABEAAAAAAAUAQwAAAAAACAAEANwFAAAIADIAAAAAAAgAMwAAAAAACAAbAAAAAAAIAB4AAAAAAAgAPQAAAAAACAAfAAEAAAAIACgA//8AAAgAKQAAAAEACAA6AAAAAQAIAD8AAAABAAgAQAAAAAEACAA7AAAAAQAIADwA//8AAAgAQgAAAAAACAAgAAEAAAAFACEAAQAAAAgAIwAAAAAACAAvAAAAAAAIADAAAAAAAAYARAAAAAAABgBFAAAAAAAFACcAAAAAAAoAAQACAAAAAQ8AAAoAAgD///////8AAMwAFwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AEAOAABAAQAAAABAAoA7wEBAQAAAAAAAAAAAAAAAAgAAAAIAAEAAAAAAAUABQAEAAAABQADAAAAAABQAAAAVAAAAAAAAAAAAAAABwAAAAMAAAA4AAEANAABADAAAQAFAAAAAQAKAAECAwQFBgAAAAAAAAAAAAAAAAAACAABAAAAAAAFAAUABAAAAFgAAABVAAAAAAAAAAAAAAAHAAAAAwAAAEAAAQA8AAEAOAABAAQAAAABAAoA7wEBAQAAAAAAAAAAAAAAAAgAAAAIAAEAAAAAAAUABQAEAAAABQADAAAAAAAkAAAAVAAAAAAAAAAAAAAABwAAAAMAAAAMAAIACAABAAUAAABUAAAAcAAAAAAAAAAAAAAABwAAAAQAAAA8AAGACAABAAAAFAAFAAMAAwAAAAUACQAAAAAABQAKAAAAAAAFAAYAAQAAAAgABwAAAAAACAAIAAAAAABcAAAAcAAAAAAAAAAAAAAABwAAAAUAAABEAAGACAABAAAAHgAGAAIAIAAAAAUAAwADAAAABQAJAAAAAAAFAAoAAAAAAAUABgABAAAACAAHAAAAAAAIAAgAAAAAACQAAABxAAAAAAAAAAAAAAAHAAAABAAAAAwAAYAIAAEAAAAUAKQAAABwAAAAAAAAAAAAAAAHAAAAAwAAAIwAAoAGAAEACgAAAAUAAwABAAAABQAEAAMAAAAIAAYAAgAAAAgABwACAAAABQAPAAAAAAAMAAgAZAAAAAAAAAAMAAoAkGUAAAAAAAAMAAsAnGMAAAAAAAAMAAwA1DAAAAAAAAAMAA0A6AMAAAAAAAAMAA4ANQwAAAAAAAAFAAUAAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"file","mode":"file","words":"-j monitor file m.bin"}} +{"id":"brmonitor/ec-024","desc":"positive: cmd=file:-d_-s_monitor_file_m.bin","cmd":"bridge -d -s monitor file m.bin","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5","echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAAoAAAAAAAUADAAAAAAADAANAIAAAgAAAAEADAAOAIAAAgAAAAEABgAPAAOAAAAGABAAAAAAAAYAEQADgAAABgASAAMAAAAFABMAAAAAAAUAFAAAAAAABQAdAAAAAAAGAB8AAAAAAAUAIAAAAAAABQAjAAAAAAAFACQAAAAAAAUAIQAAAAAABQAnAAAAAAAFACgAAAAAAAUAKwAAAAAABQAtAAAAAAAMABUAAAAAAAAAAAAMABYA2wUAAAAAAAAMABcAAAAAAAAAAAAFABkAAQAAAAgAJQAAAgAACAAmAAAAAAAIACkAAAAAAAgAKgAAAAAADAAaAAgAAgAGAAEAzAUAABAAAAAAAAAAAAAAAAAAAQAHAAAAggAAAP////8IAAMAbWswAAgADQDoAwAABQAQAAIAAAAFABEAAAAAAAUAQwAAAAAACAAEANwFAAAIADIAAAAAAAgA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AAAAAAMAAsAnGMAAAAAAAAMAAwA1DAAAAAAAAAMAA0A6AMAAAAAAAAMAA4ANQwAAAAAAAAFAAUAAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"file","mode":"file","words":"-d -s monitor file m.bin"}} +{"id":"brmonitor/ec-025","desc":"boundary: cmd=one:monitor_file_m.bin","cmd":"bridge monitor file m.bin","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5","echo VAAAABwAAAAAAAAAAAAAAAcAAAAEAAAAQAAAAAoAAgACAAAACgEAAAgACQADAAAACAAPAAAAAAAUAAMAAAAAAAAAAAAAAAAAAAAAAAYABQAKAAAA | base64 -d > m.bin"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"one","mode":"file","words":"monitor file m.bin"}} +{"id":"brmonitor/ec-026","desc":"boundary: cmd=empty:monitor_file_m.bin","cmd":"bridge monitor file m.bin","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5",": > m.bin"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"fix":"empty","mode":"file","words":"monitor file m.bin"}} +{"id":"brmonitor/ec-027","desc":"corner: cmd=file:batch:filter-then-file","cmd":"bridge -batch b.txt","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5","echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAAoAAAAAAAUADAAAAAAADAANAIAAAgAAAAEADAAOAIAAAgAAAAEABgAPAAOAAAAGABAAAAAAAAYAEQADgAAABgASAAMAAAAFABMAAAAAAAUAFAAAAAAABQAdAAAAAAAGAB8AAAAAAAUAIAAAAAAABQAjAAAAAAAFACQAAAAAAAUAIQAAAAAABQAnAAAAAAAFACgAAAAAA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AHgAGAAIAIAAAAAUAAwADAAAABQAJAAAAAAAFAAoAAAAAAAUABgABAAAACAAHAAAAAAAIAAgAAAAAACQAAABxAAAAAAAAAAAAAAAHAAAABAAAAAwAAYAIAAEAAAAUAKQAAABwAAAAAAAAAAAAAAAHAAAAAwAAAIwAAoAGAAEACgAAAAUAAwABAAAABQAEAAMAAAAIAAYAAgAAAAgABwACAAAABQAPAAAAAAAMAAgAZAAAAAAAAAAMAAoAkGUAAAAAAAAMAAsAnGMAAAAAAAAMAAwA1DAAAAAAAAAMAA0A6AMAAAAAAAAMAA4ANQwAAAAAAAAFAAUAAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin","printf '%s\\n' 'fdb show dev d1' 'monitor file m.bin' > b.txt"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"batch":"filter-then-file","fix":"file","mode":"file","words":"-batch b.txt"}} +{"id":"brmonitor/ec-028","desc":"corner: cmd=file:batch:all-then-file","cmd":"bridge -batch b.txt","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5","echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAAC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AKAAECAwQFBgAAAAAAAAAAAAAAAAAACAABAAAAAAAFAAUABAAAAFgAAABVAAAAAAAAAAAAAAAHAAAAAwAAAEAAAQA8AAEAOAABAAQAAAABAAoA7wEBAQAAAAAAAAAAAAAAAAgAAAAIAAEAAAAAAAUABQAEAAAABQADAAAAAAAkAAAAVAAAAAAAAAAAAAAABwAAAAMAAAAMAAIACAABAAUAAABUAAAAcAAAAAAAAAAAAAAABwAAAAQAAAA8AAGACAABAAAAFAAFAAMAAwAAAAUACQAAAAAABQAKAAAAAAAFAAYAAQAAAAgABwAAAAAACAAIAAAAAABcAAAAcAAAAAAAAAAAAAAABwAAAAUAAABEAAGACAABAAAAHgAGAAIAIAAAAAUAAwADAAAABQAJAAAAAAAFAAoAAAAAAAUABgABAAAACAAHAAAAAAAIAAgAAAAAACQAAABxAAAAAAAAAAAAAAAHAAAABAAAAAwAAYAIAAEAAAAUAKQAAABwAAAAAAAAAAAAAAAHAAAAAwAAAIwAAoAGAAEACgAAAAUAAwABAAAABQAEAAMAAAAIAAYAAgAAAAgABwACAAAABQAPAAAAAAAMAAgAZAAAAAAAAAAMAAoAkGUAAAAAAAAMAAsAnGMAAAAAAAAMAAwA1DAAAAAAAAAMAA0A6AMAAAAAAAAMAA4ANQwAAAAAAAAFAAUAAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin","printf '%s\\n' 'monitor file m.bin all' 'monitor file m.bin' > b.txt"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"batch":"all-then-file","fix":"file","mode":"file","words":"-batch b.txt"}} +{"id":"brmonitor/ec-029","desc":"corner: cmd=file:batch:show-then-stamped-file","cmd":"bridge -t -batch b.txt","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5","echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAAoAAAAAAAUADAAAAAAADAANAIAAAgAAAAEADAAOAIAAAgAAAAEABgAPAAOAAAAGABAAAAAAAAYAEQADgAAABgASAAMAAAAFABMAAAAAAAUAFAAAAAAABQAdAAAAAAAGAB8AAAAAAAUAIAAAAAAABQAjAAAAAAAFACQAAAAAAAUAIQAAAAAABQAnAAAAAAAFACgAAAAAAAUAKwAAAAAABQAtAAAAAAAMABUAAAAAAAAAAAAMABYA2wUAAAAAAAAMABcAAAAAAAAAAAAFABkAAQAAAAgAJQAAAgAACAAmAAAAAAAIACkAAAAAAAgAKgAAAAAADAAaAAgAAgAGAAEAzAUAABAAAAAAAAAAAAAAAAAAAQAHAAAAggAAAP////8IAAMAbWswAAgADQDoAwAABQAQAAIAAAAFABEAAAAAAAUAQwAAAAAACAAEANwFAAAIADIAAAAAAAgAMwAAAAAACAAbAAAAAAAIAB4AAAAAAAgAPQAAAAAACAAfAAEAAAAIACgA//8AAAgAKQAAAAEACAA6AAAAAQAIAD8AAA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AAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin","printf '%s\\n' 'fdb show' 'monitor file m.bin' > b.txt"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"batch":"show-then-stamped-file","fix":"file","mode":"file","words":"-t -batch b.txt"}} +{"id":"brmonitor/ec-030","desc":"corner: cmd=file:batch:file-then-file","cmd":"bridge -batch b.txt","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5","echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAAoAAAAAAAUADAAAAAAADAANAIAAAgAAAAEADAAOAIAAAgAAAAEABgAPAAOAAAAGABAAAAAAAAYAEQADgAAABgASAAMAAAAFABMAAAAAAAUAFAAAAAAABQAdAAAAAAAGAB8AAAAAAAUAIAAAAAAABQAjAAAAAAAFACQAAAAAAAUAIQA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AAAAABwAAAAUAAABEAAGACAABAAAAHgAGAAIAIAAAAAUAAwADAAAABQAJAAAAAAAFAAoAAAAAAAUABgABAAAACAAHAAAAAAAIAAgAAAAAACQAAABxAAAAAAAAAAAAAAAHAAAABAAAAAwAAYAIAAEAAAAUAKQAAABwAAAAAAAAAAAAAAAHAAAAAwAAAIwAAoAGAAEACgAAAAUAAwABAAAABQAEAAMAAAAIAAYAAgAAAAgABwACAAAABQAPAAAAAAAMAAgAZAAAAAAAAAAMAAoAkGUAAAAAAAAMAAsAnGMAAAAAAAAMAAwA1DAAAAAAAAAMAA0A6AMAAAAAAAAMAA4ANQwAAAAAAAAFAAUAAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin","printf '%s\\n' 'monitor file m.bin' 'monitor file m.bin link' > b.txt"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"refused_by":"none"},"axes":{"batch":"file-then-file","fix":"file","mode":"file","words":"-batch b.txt"}} +{"id":"brmonitor/ng-001","desc":"negative: cmd=ng:bare:monitor_help: help prints the usage and exits 255 (B72)","cmd":"bridge monitor help","modules":["bridge","vxlan"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"bare","mode":"file","words":"monitor help"}} +{"id":"brmonitor/ng-002","desc":"negative: cmd=ng:bare:monitor_h: h is help by prefix, past every selector (B59)","cmd":"bridge monitor h","modules":["bridge","vxlan"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"bare","mode":"file","words":"monitor h"}} +{"id":"brmonitor/ng-003","desc":"negative: cmd=ng:bare:monitor_f: f is file, not fdb, and takes the next word (B59)","cmd":"bridge monitor f","modules":["bridge","vxlan"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"bare","mode":"file","words":"monitor f"}} +{"id":"brmonitor/ng-004","desc":"negative: cmd=ng:bare:monitor_fdbx: an unknown word","cmd":"bridge monitor fdbx","modules":["bridge","vxlan"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"bare","mode":"file","words":"monitor fdbx"}} +{"id":"brmonitor/ng-005","desc":"negative: cmd=ng:bare:monitor_a: all is strcmp: a is unknown (B59)","cmd":"bridge monitor a","modules":["bridge","vxlan"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"bare","mode":"file","words":"monitor a"}} +{"id":"brmonitor/ng-006","desc":"negative: cmd=ng:bare:monitor_vn: vni is strcmp and vn no prefix of vlan: unknown (B59)","cmd":"bridge monitor vn","modules":["bridge","vxlan"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"bare","mode":"file","words":"monitor vn"}} +{"id":"brmonitor/ng-007","desc":"negative: cmd=ng:bare:monitor_file: file with no value (B72)","cmd":"bridge monitor file","modules":["bridge","vxlan"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"bare","mode":"file","words":"monitor file"}} +{"id":"brmonitor/ng-008","desc":"negative: cmd=ng:bare:monitor_file_/nonexistent: Cannot fopen","cmd":"bridge monitor file /nonexistent","modules":["bridge","vxlan"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"bare","mode":"file","words":"monitor file /nonexistent"}} +{"id":"brmonitor/ng-009","desc":"negative: cmd=ng:trunc:monitor_file_m.bin: a record cut inside its body","cmd":"bridge monitor file m.bin","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5","echo VAAAABwAAAAAAAAAAAAAAAcAAAAEAAAAQAAAAAoAAgACAAAACgEAAAgACQADAAAACAAPAAAAAAAUAAMAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"trunc","mode":"file","words":"monitor file m.bin"}} +{"id":"brmonitor/ng-010","desc":"negative: cmd=ng:malformed:monitor_file_m.bin: a record whose length is under the header's","cmd":"bridge monitor file m.bin","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5","echo CAAAABwAAAAAAAAAAAAAAA== | base64 -d > m.bin"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"fix":"malformed","mode":"file","words":"monitor file m.bin"}} +{"id":"brmonitor/ng-011","desc":"negative: cmd=ng:missing:monitor_file_m.bin: a record's ifindex the host lacks: ll_link_get's RTM_GETLINK gets ENODEV and the name is if9, rc 0 (B66)","cmd":"bridge monitor file m.bin","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5","echo JAAAAHgAAAAAAAAAAAAAAAcAAAAJAAAADAABgAgAAQD0AQAA | base64 -d > m.bin"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":0,"errno":"ENODEV","refused_by":"kernel-ignored"},"axes":{"fix":"missing","mode":"file","words":"monitor file m.bin"}} +{"id":"brmonitor/ng-012","desc":"negative: cmd=ng:file:batch:file-then-show: monitor closed rth, so the show's dump request fails with EBADF and exits 1 (B63)","cmd":"bridge -batch b.txt","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5","echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAAoAAAAAAAUADAAAAAAADAANAIAAAgAAAAEADAAOAIAAAgAAAAEABgAPAAOAAAAGABAAAAAAAAYAEQADgAAABgASAAMAAAAFABMAAAAAAAUAFAAAAAAABQAdAAAAAAAGAB8AAAAAAAU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gABwAAAAAACAAIAAAAAABcAAAAcAAAAAAAAAAAAAAABwAAAAUAAABEAAGACAABAAAAHgAGAAIAIAAAAAUAAwADAAAABQAJAAAAAAAFAAoAAAAAAAUABgABAAAACAAHAAAAAAAIAAgAAAAAACQAAABxAAAAAAAAAAAAAAAHAAAABAAAAAwAAYAIAAEAAAAUAKQAAABwAAAAAAAAAAAAAAAHAAAAAwAAAIwAAoAGAAEACgAAAAUAAwABAAAABQAEAAMAAAAIAAYAAgAAAAgABwACAAAABQAPAAAAAAAMAAgAZAAAAAAAAAAMAAoAkGUAAAAAAAAMAAsAnGMAAAAAAAAMAAwA1DAAAAAAAAAMAA0A6AMAAAAAAAAMAA4ANQwAAAAAAAAFAAUAAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin","printf '%s\\n' 'monitor file m.bin' 'vlan show' > b.txt"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":1,"refused_by":"ack-then-fail"},"axes":{"batch":"file-then-show","fix":"file","mode":"file","words":"-batch b.txt"}} +{"id":"brmonitor/ng-013","desc":"negative: cmd=ng:file:batch:all-then-show: the banner would leak into the show, but B63's EBADF exits first (B62)","cmd":"bridge -batch b.txt","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3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AAAAgAAAAIAAEAAAAAAAUABQAEAAAABQADAAAAAABQAAAAVAAAAAAAAAAAAAAABwAAAAMAAAA4AAEANAABADAAAQAFAAAAAQAKAAECAwQFBgAAAAAAAAAAAAAAAAAACAABAAAAAAAFAAUABAAAAFgAAABVAAAAAAAAAAAAAAAHAAAAAwAAAEAAAQA8AAEAOAABAAQAAAABAAoA7wEBAQAAAAAAAAAAAAAAAAgAAAAIAAEAAAAAAAUABQAEAAAABQADAAAAAAAkAAAAVAAAAAAAAAAAAAAABwAAAAMAAAAMAAIACAABAAUAAABUAAAAcAAAAAAAAAAAAAAABwAAAAQAAAA8AAGACAABAAAAFAAFAAMAAwAAAAUACQAAAAAABQAKAAAAAAAFAAYAAQAAAAgABwAAAAAACAAIAAAAAABcAAAAcAAAAAAAAAAAAAAABwAAAAUAAABEAAGACAABAAAAHgAGAAIAIAAAAAUAAwADAAAABQAJAAAAAAAFAAoAAAAAAAUABgABAAAACAAHAAAAAAAIAAgAAAAAACQAAABxAAAAAAAAAAAAAAAHAAAABAAAAAwAAYAIAAEAAAAUAKQAAABwAAAAAAAAAAAAAAAHAAAAAwAAAIwAAoAGAAEACgAAAAUAAwABAAAABQAEAAMAAAAIAAYAAgAAAAgABwACAAAABQAPAAAAAAAMAAgAZAAAAAAAAAAMAAoAkGUAAAAAAAAMAAsAnGMAAAAAAAAMAAwA1DAAAAAAAAAMAA0A6AMAAAAAAAAMAA4ANQwAAAAAAAAFAAUAAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin","printf '%s\\n' 'monitor file m.bin all' 'fdb show' > b.txt"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":1,"refused_by":"ack-then-fail"},"axes":{"batch":"all-then-show","fix":"file","mode":"file","words":"-batch b.txt"}} +{"id":"brmonitor/ng-014","desc":"negative: cmd=ng:file:batch:missing-then-show: Cannot fopen exits -1, which ends even a -force batch","cmd":"bridge -force -batch b.txt","pre":["ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none","ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up","bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10","ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up","sleep 1.5","echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAAoAAAAAAAUADAAAAAAADAANAIAAAgAAAAEADAAOAIAAAgAAAAEABgAPAAOAAAAGABAAAAAAAAYAEQADgAAABgASAAMAAAAFABMAAAAAAAUAFAAAAAAABQAdAAAAAAAGAB8AAAAAAAUAIAAAAAAABQAjAAAAAAAFACQAAAAAAAUAIQAAAAAABQAnAAAAAAAFACgAAAAAAAUAKwAAAAAABQAtAAAAAAAMABUAAAAAAAAAAAAMABYA2wUAAAAAAAAMABcAAAAAAAAAAAAFABkAAQAAAAgAJQAAAgAACAAmAAAAAAAIACkAAAAAAAgAKgAAAAAADAAaAAgAAgAGAAEAzAUAABAAAAAAAAAAAAAAAAAAAQAHAAAAggAAAP////8IAAMAbWswAAgADQDoAwAABQAQAAIAAAAFABEAAAAAAAUAQw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AMAAgAZAAAAAAAAAAMAAoAkGUAAAAAAAAMAAsAnGMAAAAAAAAMAAwA1DAAAAAAAAAMAA0A6AMAAAAAAAAMAA4ANQwAAAAAAAAFAAUAAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin","printf '%s\\n' 'monitor file /nonexistent' 'link show' > b.txt"],"modules":["bridge","vxlan"],"proto":"route","expect":{"rc":255,"refused_by":"iproute2"},"axes":{"batch":"missing-then-show","fix":"file","mode":"file","words":"-force -batch b.txt"}} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-001/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-001/cmd.json new file mode 100644 index 000000000..e4d1c7e59 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-001/cmd.json @@ -0,0 +1,65 @@ +{ + "axes": { + "fix": "link", + "mode": "live", + "trigger": "ip link set d3 master br0 && bridge link set dev d3 cost 9 && ip link set d3 nomaster && sleep 1.5 && ip link add mk0 address 02:00:00:00:01:0f type dummy", + "until": "mk0", + "words": "monitor link" + }, + "cmd": "xtcp2-nl-brmon-ws 'monitor link' 'ip link set d3 master br0 && bridge link set dev d3 cost 9 && ip link set d3 nomaster && sleep 1.5 && ip link add mk0 address 02:00:00:00:01:0f type dummy' 'mk0'", + "desc": "positive: cmd=link:live:monitor_link", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-001", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-001/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-001/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-001/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-001/ip.out new file mode 100644 index 000000000..1dd48dc25 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-001/ip.out @@ -0,0 +1,13 @@ +6: d3: mtu 1500 master br0 +6: d3: mtu 1500 master br0 +6: d3: mtu 1500 master br0 state forwarding priority 32 cost 100 +6: d3: mtu 1500 master br0 state forwarding priority 32 cost 100 +6: d3: mtu 1500 master br0 state forwarding priority 32 cost 100 +3: br0: mtu 1500 +6: d3: mtu 1500 master br0 state forwarding priority 32 cost 9 +6: d3: mtu 1500 master br0 +6: d3: mtu 1500 master br0 state disabled priority 32 cost 9 +Deleted 6: d3: mtu 1500 master br0 +6: d3: mtu 1500 +3: br0: mtu 1500 +7: mk0: mtu 1500 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-001/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-001/ip.pcap new file mode 100644 index 000000000..5e0437bb8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-001/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-001/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-001/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-001/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-002/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-002/cmd.json new file mode 100644 index 000000000..65b6a3672 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-002/cmd.json @@ -0,0 +1,65 @@ +{ + "axes": { + "fix": "fdb", + "mode": "live", + "trigger": "bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10 && bridge fdb replace 02:00:00:00:0a:01 dev d2 master static vlan 10 && bridge fdb del 02:00:00:00:0a:01 dev d2 master vlan 10 && ip neigh add 192.0.2.5 lladdr 02:00:00:00:0a:05 dev br0 && sleep 1.5 && bridge fdb add 02:00:00:00:0f:ff dev d1 master static vlan 10", + "until": "0f:ff", + "words": "monitor fdb" + }, + "cmd": "xtcp2-nl-brmon-ws 'monitor fdb' 'bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10 && bridge fdb replace 02:00:00:00:0a:01 dev d2 master static vlan 10 && bridge fdb del 02:00:00:00:0a:01 dev d2 master vlan 10 && ip neigh add 192.0.2.5 lladdr 02:00:00:00:0a:05 dev br0 && sleep 1.5 && bridge fdb add 02:00:00:00:0f:ff dev d1 master static vlan 10' '0f:ff'", + "desc": "positive: cmd=fdb:live:monitor_fdb", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-002", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-002/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-002/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-002/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-002/ip.out new file mode 100644 index 000000000..43786654c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-002/ip.out @@ -0,0 +1,4 @@ +02:00:00:00:0a:01 dev d1 vlan 10 master br0 static +02:00:00:00:0a:01 dev d2 vlan 10 master br0 static +Deleted 02:00:00:00:0a:01 dev d2 vlan 10 master br0 static +02:00:00:00:0f:ff dev d1 vlan 10 master br0 static diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-002/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-002/ip.pcap new file mode 100644 index 000000000..11f0a6036 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-002/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-002/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-002/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-002/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-003/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-003/cmd.json new file mode 100644 index 000000000..efbf55cab --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-003/cmd.json @@ -0,0 +1,55 @@ +{ + "axes": { + "fix": "fdbvx", + "mode": "live", + "trigger": "bridge fdb add 00:00:00:00:00:00 dev vx0 dst 192.0.2.1 && bridge fdb append 00:00:00:00:00:00 dev vx0 dst 192.0.2.2 port 4790 vni 200 && bridge fdb del 00:00:00:00:00:00 dev vx0 dst 192.0.2.1 && sleep 1.5 && bridge fdb add 02:00:00:00:0f:ff dev vx0 dst 192.0.2.9", + "until": "0f:ff", + "words": "monitor fdb" + }, + "cmd": "xtcp2-nl-brmon-ws 'monitor fdb' 'bridge fdb add 00:00:00:00:00:00 dev vx0 dst 192.0.2.1 && bridge fdb append 00:00:00:00:00:00 dev vx0 dst 192.0.2.2 port 4790 vni 200 && bridge fdb del 00:00:00:00:00:00 dev vx0 dst 192.0.2.1 && sleep 1.5 && bridge fdb add 02:00:00:00:0f:ff dev vx0 dst 192.0.2.9' '0f:ff'", + "desc": "positive: cmd=fdbvx:live:monitor_fdb", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-003", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add d5 address 02:00:00:00:01:05 type dummy && ip link set d5 addrgenmode none && ip link set d5 up && ip addr add 192.0.2.10/24 dev d5", + "ip link add vx0 address 02:00:00:00:01:10 type vxlan id 100 dstport 4789 local 192.0.2.10 nolearning && ip link set vx0 addrgenmode none && ip link set vx0 up", + "sleep 1.5" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d5 address 02:00:00:00:01:05 type dummy && ip link set d5 addrgenmode none && ip link set d5 up && ip addr add 192.0.2.10/24 dev d5", + "rc": 0 + }, + { + "cmd": "ip link add vx0 address 02:00:00:00:01:10 type vxlan id 100 dstport 4789 local 192.0.2.10 nolearning && ip link set vx0 addrgenmode none && ip link set vx0 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-003/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-003/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-003/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-003/ip.out new file mode 100644 index 000000000..dddd21bab --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-003/ip.out @@ -0,0 +1,4 @@ +00:00:00:00:00:00 dev vx0 dst 192.0.2.1 self permanent +00:00:00:00:00:00 dev vx0 dst 192.0.2.2 port 4790 vni 200 self permanent +Deleted 00:00:00:00:00:00 dev vx0 dst 192.0.2.1 self permanent +02:00:00:00:0f:ff dev vx0 dst 192.0.2.9 self permanent diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-003/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-003/ip.pcap new file mode 100644 index 000000000..477ecb2a6 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-003/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-003/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-003/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-003/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-004/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-004/cmd.json new file mode 100644 index 000000000..f19d6ef26 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-004/cmd.json @@ -0,0 +1,60 @@ +{ + "axes": { + "fix": "mdb", + "mode": "live", + "trigger": "bridge mdb add dev br0 port d1 grp 239.1.1.1 permanent vid 10 && bridge mdb add dev br0 port d2 grp ff0e::1 permanent vid 10 && bridge mdb add dev br0 port d2 grp 01:02:03:04:05:06 permanent vid 10 && bridge mdb replace dev br0 port d1 grp 239.1.1.1 permanent vid 10 && bridge mdb del dev br0 port d1 grp 239.1.1.1 vid 10 && bridge link set dev d2 mcast_router 2 && sleep 1.5 && bridge mdb add dev br0 port d1 grp 239.9.9.9 permanent vid 10", + "until": "239\\.9\\.9\\.9", + "words": "monitor mdb" + }, + "cmd": "xtcp2-nl-brmon-ws 'monitor mdb' 'bridge mdb add dev br0 port d1 grp 239.1.1.1 permanent vid 10 && bridge mdb add dev br0 port d2 grp ff0e::1 permanent vid 10 && bridge mdb add dev br0 port d2 grp 01:02:03:04:05:06 permanent vid 10 && bridge mdb replace dev br0 port d1 grp 239.1.1.1 permanent vid 10 && bridge mdb del dev br0 port d1 grp 239.1.1.1 vid 10 && bridge link set dev d2 mcast_router 2 && sleep 1.5 && bridge mdb add dev br0 port d1 grp 239.9.9.9 permanent vid 10' '239\\.9\\.9\\.9'", + "desc": "positive: cmd=mdb:live:monitor_mdb", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-004", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none && ip link set br0 type bridge mcast_igmp_version 3 mcast_mld_version 2 && echo 1 > /proc/sys/net/ipv6/conf/br0/disable_ipv6", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10 && bridge vlan add dev br0 vid 10 self", + "sleep 1.5" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none && ip link set br0 type bridge mcast_igmp_version 3 mcast_mld_version 2 && echo 1 > /proc/sys/net/ipv6/conf/br0/disable_ipv6", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10 && bridge vlan add dev br0 vid 10 self", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-004/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-004/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-004/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-004/ip.out new file mode 100644 index 000000000..8b79d3eea --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-004/ip.out @@ -0,0 +1,7 @@ +dev br0 port d1 grp 239.1.1.1 permanent vid 10 +dev br0 port d2 grp ff0e::1 permanent vid 10 +dev br0 port d2 grp 01:02:03:04:05:06 permanent vid 10 +dev br0 port d1 grp 239.1.1.1 permanent vid 10 +Deleted dev br0 port d1 grp 239.1.1.1 permanent vid 10 +router port dev d2 master br0 +dev br0 port d1 grp 239.9.9.9 permanent vid 10 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-004/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-004/ip.pcap new file mode 100644 index 000000000..b3387c8bb Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-004/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-004/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-004/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-004/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-005/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-005/cmd.json new file mode 100644 index 000000000..5d2d5605c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-005/cmd.json @@ -0,0 +1,70 @@ +{ + "axes": { + "fix": "vlan", + "mode": "live", + "trigger": "bridge vlan add dev d1 vid 20 && bridge vlan add dev d2 vid 30-32 && bridge vlan del dev d1 vid 20 && bridge vlan global set dev br0 vid 10 mcast_igmp_version 3 && sleep 1.5 && bridge vlan add dev d2 vid 3999", + "until": "3999", + "words": "monitor vlan" + }, + "cmd": "xtcp2-nl-brmon-ws 'monitor vlan' 'bridge vlan add dev d1 vid 20 && bridge vlan add dev d2 vid 30-32 && bridge vlan del dev d1 vid 20 && bridge vlan global set dev br0 vid 10 mcast_igmp_version 3 && sleep 1.5 && bridge vlan add dev d2 vid 3999' '3999'", + "desc": "positive: cmd=vlan:live:monitor_vlan", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-005", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "ip link set br0 type bridge mcast_vlan_snooping 1", + "sleep 1.5" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "ip link set br0 type bridge mcast_vlan_snooping 1", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-005/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-005/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-005/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-005/ip.out new file mode 100644 index 000000000..8800813d0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-005/ip.out @@ -0,0 +1,10 @@ +d1 20 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off +d2 30-32 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off +Deleted d1 20 + state disabled +br0 10 + mcast_snooping 1 mcast_querier 0 mcast_igmp_version 3 mcast_mld_version 1 mcast_last_member_count 2 mcast_last_member_interval 100 mcast_startup_query_count 2 mcast_startup_query_interval 3125 mcast_membership_interval 26000 mcast_querier_interval 25500 mcast_query_interval 12500 mcast_query_response_interval 1000 msti 0 +d2 3999 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-005/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-005/ip.pcap new file mode 100644 index 000000000..9aba17481 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-005/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-005/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-005/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-005/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-006/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-006/cmd.json new file mode 100644 index 000000000..32c50ffb6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-006/cmd.json @@ -0,0 +1,60 @@ +{ + "axes": { + "fix": "vni", + "mode": "live", + "trigger": "bridge vni add dev vx1 vni 500 && bridge vni add dev vx1 vni 600-602 && bridge vni del dev vx1 vni 500 && sleep 1.5 && bridge vni add dev vx1 vni 999999", + "until": "999999", + "words": "monitor vni" + }, + "cmd": "xtcp2-nl-brmon-ws 'monitor vni' 'bridge vni add dev vx1 vni 500 && bridge vni add dev vx1 vni 600-602 && bridge vni del dev vx1 vni 500 && sleep 1.5 && bridge vni add dev vx1 vni 999999' '999999'", + "desc": "positive: cmd=vni:live:monitor_vni", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-006", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add d9 address 02:00:00:00:01:09 type dummy && ip link set d9 addrgenmode none && ip link set d9 up", + "ip link add vx1 address 02:00:00:00:01:11 type vxlan external vnifilter dstport 4790 dev d9 && ip link set vx1 addrgenmode none", + "bridge vni add dev vx1 vni 100", + "sleep 1.5" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add d9 address 02:00:00:00:01:09 type dummy && ip link set d9 addrgenmode none && ip link set d9 up", + "rc": 0 + }, + { + "cmd": "ip link add vx1 address 02:00:00:00:01:11 type vxlan external vnifilter dstport 4790 dev d9 && ip link set vx1 addrgenmode none", + "rc": 0 + }, + { + "cmd": "bridge vni add dev vx1 vni 100", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-006/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-006/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-006/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-006/ip.out new file mode 100644 index 000000000..95be451de --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-006/ip.out @@ -0,0 +1,6 @@ +vx1 500 +vx1 600 +vx1 601 +vx1 602 +Deleted vx1 500 +vx1 999999 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-006/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-006/ip.pcap new file mode 100644 index 000000000..08568d03f Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-006/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-006/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-006/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-006/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-007/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-007/cmd.json new file mode 100644 index 000000000..9bec217af --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-007/cmd.json @@ -0,0 +1,65 @@ +{ + "axes": { + "fix": "fdbvlan", + "mode": "live", + "trigger": "bridge vlan add dev d1 vid 20 && bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10 && sleep 1.5 && bridge vlan add dev d2 vid 3999", + "until": "3999", + "words": "monitor fdb vlan" + }, + "cmd": "xtcp2-nl-brmon-ws 'monitor fdb vlan' 'bridge vlan add dev d1 vid 20 && bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10 && sleep 1.5 && bridge vlan add dev d2 vid 3999' '3999'", + "desc": "positive: cmd=fdbvlan:live:monitor_fdb_vlan", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-007", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-007/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-007/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-007/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-007/ip.out new file mode 100644 index 000000000..2b06d0e2e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-007/ip.out @@ -0,0 +1,7 @@ +02:00:00:00:01:01 dev d1 vlan 20 master br0 permanent +d1 20 + state forwarding mcast_router 1 neigh_suppress off neigh_forward_grat off +02:00:00:00:0a:01 dev d1 vlan 10 master br0 static +02:00:00:00:01:02 dev d2 vlan 3999 master br0 permanent +d2 3999 + state forwarding mcast_router 1 neigh_suppress off neigh_forward_grat off diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-007/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-007/ip.pcap new file mode 100644 index 000000000..1ae4df1b7 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-007/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-007/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-007/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-007/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-008/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-008/cmd.json new file mode 100644 index 000000000..413cd6530 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-008/cmd.json @@ -0,0 +1,65 @@ +{ + "axes": { + "fix": "bare", + "mode": "live", + "trigger": "bridge vlan add dev d1 vid 20 && sleep 1.5 && bridge fdb add 02:00:00:00:0f:ff dev d1 master static vlan 10", + "until": "0f:ff", + "words": "monitor" + }, + "cmd": "xtcp2-nl-brmon-ws 'monitor' 'bridge vlan add dev d1 vid 20 && sleep 1.5 && bridge fdb add 02:00:00:00:0f:ff dev d1 master static vlan 10' '0f:ff'", + "desc": "corner: cmd=bare:live:monitor", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-008", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-008/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-008/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-008/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-008/ip.out new file mode 100644 index 000000000..e99a9dcc4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-008/ip.out @@ -0,0 +1,3 @@ +02:00:00:00:01:01 dev d1 vlan 20 master br0 permanent +4: d1: mtu 1500 master br0 state forwarding priority 32 cost 100 +02:00:00:00:0f:ff dev d1 vlan 10 master br0 static diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-008/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-008/ip.pcap new file mode 100644 index 000000000..f7b137c39 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-008/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-008/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-008/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-008/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-009/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-009/cmd.json new file mode 100644 index 000000000..f573d9367 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-009/cmd.json @@ -0,0 +1,65 @@ +{ + "axes": { + "fix": "all", + "mode": "live", + "trigger": "bridge vlan add dev d1 vid 20 && sleep 1.5 && bridge fdb add 02:00:00:00:0f:ff dev d1 master static vlan 10", + "until": "0f:ff", + "words": "monitor all" + }, + "cmd": "xtcp2-nl-brmon-ws 'monitor all' 'bridge vlan add dev d1 vid 20 && sleep 1.5 && bridge fdb add 02:00:00:00:0f:ff dev d1 master static vlan 10' '0f:ff'", + "desc": "corner: cmd=all:live:monitor_all", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-009", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-009/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-009/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-009/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-009/ip.out new file mode 100644 index 000000000..909da158f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-009/ip.out @@ -0,0 +1,5 @@ +[NEIGH]02:00:00:00:01:01 dev d1 vlan 20 master br0 permanent +[VLAN]d1 20 + state forwarding mcast_router 1 neigh_suppress off neigh_forward_grat off +[LINK]4: d1: mtu 1500 master br0 state forwarding priority 32 cost 100 +[NEIGH]02:00:00:00:0f:ff dev d1 vlan 10 master br0 static diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-009/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-009/ip.pcap new file mode 100644 index 000000000..10a92f0a0 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-009/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-009/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-009/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-009/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-010/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-010/cmd.json new file mode 100644 index 000000000..6135ea71d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-010/cmd.json @@ -0,0 +1,65 @@ +{ + "axes": { + "fix": "alllink", + "mode": "live", + "trigger": "bridge vlan add dev d1 vid 20 && bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10 && sleep 1.5 && ip link add mk0 address 02:00:00:00:01:0f type dummy", + "until": "mk0", + "words": "monitor all link" + }, + "cmd": "xtcp2-nl-brmon-ws 'monitor all link' 'bridge vlan add dev d1 vid 20 && bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10 && sleep 1.5 && ip link add mk0 address 02:00:00:00:01:0f type dummy' 'mk0'", + "desc": "corner: cmd=alllink:live:monitor_all_link", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-010", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-010/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-010/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-010/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-010/ip.out new file mode 100644 index 000000000..8d99fab2d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-010/ip.out @@ -0,0 +1,4 @@ +[VLAN]d1 20 + state forwarding mcast_router 1 neigh_suppress off neigh_forward_grat off +[LINK]4: d1: mtu 1500 master br0 state forwarding priority 32 cost 100 +[LINK]7: mk0: mtu 1500 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-010/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-010/ip.pcap new file mode 100644 index 000000000..82b731d3c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-010/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-010/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-010/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-010/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-011/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-011/cmd.json new file mode 100644 index 000000000..99cabdc3a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-011/cmd.json @@ -0,0 +1,65 @@ +{ + "axes": { + "fix": "linkall", + "mode": "live", + "trigger": "bridge vlan add dev d1 vid 20 && bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10 && sleep 1.5 && ip link add mk0 address 02:00:00:00:01:0f type dummy", + "until": "mk0", + "words": "monitor link all" + }, + "cmd": "xtcp2-nl-brmon-ws 'monitor link all' 'bridge vlan add dev d1 vid 20 && bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10 && sleep 1.5 && ip link add mk0 address 02:00:00:00:01:0f type dummy' 'mk0'", + "desc": "corner: cmd=linkall:live:monitor_link_all", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-011", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-011/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-011/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-011/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-011/ip.out new file mode 100644 index 000000000..c18085fb0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-011/ip.out @@ -0,0 +1,6 @@ +[NEIGH]02:00:00:00:01:01 dev d1 vlan 20 master br0 permanent +[VLAN]d1 20 + state forwarding mcast_router 1 neigh_suppress off neigh_forward_grat off +[LINK]4: d1: mtu 1500 master br0 state forwarding priority 32 cost 100 +[NEIGH]02:00:00:00:0a:01 dev d1 vlan 10 master br0 static +[LINK]7: mk0: mtu 1500 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-011/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-011/ip.pcap new file mode 100644 index 000000000..66686f9a2 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-011/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-011/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-011/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-011/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-012/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-012/cmd.json new file mode 100644 index 000000000..897283e3b --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-012/cmd.json @@ -0,0 +1,65 @@ +{ + "axes": { + "fix": "prefix", + "mode": "live", + "trigger": "bridge vlan add dev d1 vid 20 && sleep 1.5 && bridge vlan add dev d2 vid 3999", + "until": "3999", + "words": "monitor v" + }, + "cmd": "xtcp2-nl-brmon-ws 'monitor v' 'bridge vlan add dev d1 vid 20 && sleep 1.5 && bridge vlan add dev d2 vid 3999' '3999'", + "desc": "corner: cmd=prefix:live:monitor_v", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-012", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-012/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-012/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-012/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-012/ip.out new file mode 100644 index 000000000..29d7eaeb3 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-012/ip.out @@ -0,0 +1,4 @@ +d1 20 + state forwarding mcast_router 1 neigh_suppress off neigh_forward_grat off +d2 3999 + state forwarding mcast_router 1 neigh_suppress off neigh_forward_grat off diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-012/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-012/ip.pcap new file mode 100644 index 000000000..c10129d72 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-012/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-012/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-012/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-012/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-013/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-013/cmd.json new file mode 100644 index 000000000..4ed73973d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-013/cmd.json @@ -0,0 +1,65 @@ +{ + "axes": { + "fix": "prefix", + "mode": "live", + "trigger": "bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10 && sleep 1.5 && bridge fdb add 02:00:00:00:0f:ff dev d1 master static vlan 10", + "until": "0f:ff", + "words": "monitor fd" + }, + "cmd": "xtcp2-nl-brmon-ws 'monitor fd' 'bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10 && sleep 1.5 && bridge fdb add 02:00:00:00:0f:ff dev d1 master static vlan 10' '0f:ff'", + "desc": "corner: cmd=prefix:live:monitor_fd", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-013", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-013/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-013/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-013/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-013/ip.out new file mode 100644 index 000000000..a8f586c38 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-013/ip.out @@ -0,0 +1,2 @@ +02:00:00:00:0a:01 dev d1 vlan 10 master br0 static +02:00:00:00:0f:ff dev d1 vlan 10 master br0 static diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-013/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-013/ip.pcap new file mode 100644 index 000000000..764a204ce Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-013/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-013/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-013/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-013/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-014/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-014/cmd.json new file mode 100644 index 000000000..051e09b04 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-014/cmd.json @@ -0,0 +1,65 @@ +{ + "axes": { + "fix": "netdev", + "mode": "live", + "trigger": "ip link set d3 mtu 1400 && ip link set d3 down && sleep 1.5 && ip link add mk0 address 02:00:00:00:01:0f type dummy", + "until": "mk0", + "words": "monitor link" + }, + "cmd": "xtcp2-nl-brmon-ws 'monitor link' 'ip link set d3 mtu 1400 && ip link set d3 down && sleep 1.5 && ip link add mk0 address 02:00:00:00:01:0f type dummy' 'mk0'", + "desc": "corner: cmd=netdev:live:monitor_link", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-014", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-014/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-014/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-014/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-014/ip.out new file mode 100644 index 000000000..711a177a6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-014/ip.out @@ -0,0 +1,3 @@ +6: d3: mtu 1400 +6: d3: mtu 1400 +7: mk0: mtu 1500 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-014/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-014/ip.pcap new file mode 100644 index 000000000..cc98ac822 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-014/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-014/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-014/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-014/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-015/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-015/cmd.json new file mode 100644 index 000000000..b64e26a26 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-015/cmd.json @@ -0,0 +1,65 @@ +{ + "axes": { + "fix": "stamp", + "mode": "live", + "trigger": "bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10 && sleep 1.5 && bridge fdb add 02:00:00:00:0f:ff dev d1 master static vlan 10", + "until": "0f:ff", + "words": "-t monitor fdb" + }, + "cmd": "xtcp2-nl-brmon-ws '-t monitor fdb' 'bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10 && sleep 1.5 && bridge fdb add 02:00:00:00:0f:ff dev d1 master static vlan 10' '0f:ff'", + "desc": "corner: cmd=stamp:live:-t_monitor_fdb", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-015", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-015/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-015/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-015/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-015/ip.out new file mode 100644 index 000000000..9b6f8d5b6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-015/ip.out @@ -0,0 +1,4 @@ +Timestamp: Fri Dec 4 08:11:28 2026 332742 usec +02:00:00:00:0a:01 dev d1 vlan 10 master br0 static +Timestamp: Fri Dec 4 08:11:29 2026 848682 usec +02:00:00:00:0f:ff dev d1 vlan 10 master br0 static diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-015/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-015/ip.pcap new file mode 100644 index 000000000..1fe210cd0 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-015/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-015/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-015/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-015/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-016/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-016/cmd.json new file mode 100644 index 000000000..09cef2de6 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-016/cmd.json @@ -0,0 +1,65 @@ +{ + "axes": { + "fix": "json", + "mode": "live", + "trigger": "bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10 && sleep 1.5 && bridge fdb add 02:00:00:00:0f:ff dev d1 master static vlan 10", + "until": "0f:ff", + "words": "-j monitor fdb" + }, + "cmd": "xtcp2-nl-brmon-ws '-j monitor fdb' 'bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10 && sleep 1.5 && bridge fdb add 02:00:00:00:0f:ff dev d1 master static vlan 10' '0f:ff'", + "desc": "corner: cmd=json:live:-j_monitor_fdb", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-016", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-016/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-016/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-016/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-016/ip.out new file mode 100644 index 000000000..a8f586c38 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-016/ip.out @@ -0,0 +1,2 @@ +02:00:00:00:0a:01 dev d1 vlan 10 master br0 static +02:00:00:00:0f:ff dev d1 vlan 10 master br0 static diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-016/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-016/ip.pcap new file mode 100644 index 000000000..88404aac5 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-016/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-016/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-016/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-016/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-017/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-017/cmd.json new file mode 100644 index 000000000..e50dd0f85 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-017/cmd.json @@ -0,0 +1,65 @@ +{ + "axes": { + "fix": "details", + "mode": "live", + "trigger": "ip link set d3 master br0 && bridge link set dev d3 cost 9 && ip link set d3 nomaster && sleep 1.5 && ip link add mk0 address 02:00:00:00:01:0f type dummy", + "until": "mk0", + "words": "-d monitor link" + }, + "cmd": "xtcp2-nl-brmon-ws '-d monitor link' 'ip link set d3 master br0 && bridge link set dev d3 cost 9 && ip link set d3 nomaster && sleep 1.5 && ip link add mk0 address 02:00:00:00:01:0f type dummy' 'mk0'", + "desc": "positive: cmd=details:live:-d_monitor_link", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-017", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-017/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-017/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-017/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-017/ip.out new file mode 100644 index 000000000..c0975c08d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-017/ip.out @@ -0,0 +1,18 @@ +6: d3: mtu 1500 master br0 +6: d3: mtu 1500 master br0 +6: d3: mtu 1500 master br0 state forwarding priority 32 cost 100 + hairpin off guard off root_block off fastleave off learning on flood on mcast_flood on bcast_flood on mcast_router 1 mcast_to_unicast off neigh_suppress off neigh_vlan_suppress off neigh_forward_grat off vlan_tunnel off isolated off locked off mab off mcast_n_groups 0 mcast_max_groups 0 +6: d3: mtu 1500 master br0 state forwarding priority 32 cost 100 + hairpin off guard off root_block off fastleave off learning on flood on mcast_flood on bcast_flood on mcast_router 1 mcast_to_unicast off neigh_suppress off neigh_vlan_suppress off neigh_forward_grat off vlan_tunnel off isolated off locked off mab off mcast_n_groups 0 mcast_max_groups 0 +6: d3: mtu 1500 master br0 state forwarding priority 32 cost 100 + hairpin off guard off root_block off fastleave off learning on flood on mcast_flood on bcast_flood on mcast_router 1 mcast_to_unicast off neigh_suppress off neigh_vlan_suppress off neigh_forward_grat off vlan_tunnel off isolated off locked off mab off mcast_n_groups 0 mcast_max_groups 0 +3: br0: mtu 1500 +6: d3: mtu 1500 master br0 state forwarding priority 32 cost 9 + hairpin off guard off root_block off fastleave off learning on flood on mcast_flood on bcast_flood on mcast_router 1 mcast_to_unicast off neigh_suppress off neigh_vlan_suppress off neigh_forward_grat off vlan_tunnel off isolated off locked off mab off mcast_n_groups 0 mcast_max_groups 0 +6: d3: mtu 1500 master br0 +6: d3: mtu 1500 master br0 state disabled priority 32 cost 9 + hairpin off guard off root_block off fastleave off learning on flood on mcast_flood on bcast_flood on mcast_router 1 mcast_to_unicast off neigh_suppress off neigh_vlan_suppress off neigh_forward_grat off vlan_tunnel off isolated off locked off mab off mcast_n_groups 0 mcast_max_groups 0 +Deleted 6: d3: mtu 1500 master br0 +6: d3: mtu 1500 +3: br0: mtu 1500 +7: mk0: mtu 1500 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-017/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-017/ip.pcap new file mode 100644 index 000000000..5b6a7e467 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-017/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-017/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-017/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-017/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-018/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-018/cmd.json new file mode 100644 index 000000000..ffc133dcb --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-018/cmd.json @@ -0,0 +1,70 @@ +{ + "axes": { + "fix": "stats", + "mode": "live", + "trigger": "bridge vlan add dev d1 vid 20 && sleep 1.5 && bridge vlan add dev d2 vid 3999", + "until": "3999", + "words": "-s monitor vlan" + }, + "cmd": "xtcp2-nl-brmon-ws '-s monitor vlan' 'bridge vlan add dev d1 vid 20 && sleep 1.5 && bridge vlan add dev d2 vid 3999' '3999'", + "desc": "positive: cmd=stats:live:-s_monitor_vlan", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-018", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "ip link set br0 type bridge mcast_vlan_snooping 1", + "sleep 1.5" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "ip link set br0 type bridge mcast_vlan_snooping 1", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-018/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-018/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-018/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-018/ip.out new file mode 100644 index 000000000..6db8f540d --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-018/ip.out @@ -0,0 +1,8 @@ +d1 20 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off + RX: 0 bytes 0 packets + TX: 0 bytes 0 packets +d2 3999 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off + RX: 0 bytes 0 packets + TX: 0 bytes 0 packets diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-018/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-018/ip.pcap new file mode 100644 index 000000000..38eafddb0 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-018/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-018/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-018/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-018/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-019/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-019/cmd.json new file mode 100644 index 000000000..957575d46 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-019/cmd.json @@ -0,0 +1,68 @@ +{ + "axes": { + "fix": "file", + "mode": "file", + "words": "monitor file m.bin" + }, + "cmd": "bridge monitor file m.bin", + "desc": "positive: cmd=file:monitor_file_m.bin", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-019", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5", + "echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQA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wAAAEAAAQA8AAEAOAABAAQAAAABAAoA7wEBAQAAAAAAAAAAAAAAAAgAAAAIAAEAAAAAAAUABQAEAAAABQADAAAAAAAkAAAAVAAAAAAAAAAAAAAABwAAAAMAAAAMAAIACAABAAUAAABUAAAAcAAAAAAAAAAAAAAABwAAAAQAAAA8AAGACAABAAAAFAAFAAMAAwAAAAUACQAAAAAABQAKAAAAAAAFAAYAAQAAAAgABwAAAAAACAAIAAAAAABcAAAAcAAAAAAAAAAAAAAABwAAAAUAAABEAAGACAABAAAAHgAGAAIAIAAAAAUAAwADAAAABQAJAAAAAAAFAAoAAAAAAAUABgABAAAACAAHAAAAAAAIAAgAAAAAACQAAABxAAAAAAAAAAAAAAAHAAAABAAAAAwAAYAIAAEAAAAUAKQAAABwAAAAAAAAAAAAAAAHAAAAAwAAAIwAAoAGAAEACgAAAAUAAwABAAAABQAEAAMAAAAIAAYAAgAAAAgABwACAAAABQAPAAAAAAAMAAgAZAAAAAAAAAAMAAoAkGUAAAAAAAAMAAsAnGMAAAAAAAAMAAwA1DAAAAAAAAAMAA0A6AMAAAAAAAAMAA4ANQwAAAAAAAAFAAUAAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + }, + { + "cmd": "echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAAoAAAAAAAUADAAAAAAADAANAIAAAgAAAAEADAAOAIAAAgAAAAEABgAPAAOAAAAGABAAAAAAAAYAEQADgAAABgASAAMAAAAFABMAAAAAAAUAFAAAAAAABQAdAAAAAAAGAB8AAAAAAAUAIAAAAAAABQAjAAAAAAAFACQAAAAAAAUAIQAAAAAABQAnAAAAAAAFACgAAAAAAAUAKwAAAAAABQAtAAAAAAAMABUAAAAAAAAAAAAMABYA2wUAAAAAAAAMABcAAAAAAAAAAAAFABkAAQAAAAgAJQAAAgAACAAmAAAAAAAIACkAAAAAAAgAKgAAAAAADAAaAAgAAgAGAAEAzAUAABAAAAAAAAAAAAAAAAAAAQAHAAAAggAAAP////8IAAMAbWswAAgADQDoAwAABQAQAAIAAAAFABEAAAAAAAUAQwAAAAAACAAEANwFAAAIADIAAAAAAAgAMwAAAAAACAAbAAAAAAAIAB4AAAAAAAgAPQAAAAAACAAfAAEAAAAIACgA//8AAAgAKQAAAAEACAA6AAAAAQAIAD8AAAABAAgAQAAAAAEACAA7AAAAAQAIADwA//8AAAgAQgAAAAAACAAgAAEAAAAFACEAAQAAAAgAIwAAAAAACAAvAAAAAAAIADAAAAAAAAYARAAAAAAABgBFAAAAAAAFACcAAAAAAAoAAQACAAA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AHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-019/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-019/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-019/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-019/ip.out new file mode 100644 index 000000000..c863a2bb9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-019/ip.out @@ -0,0 +1,21 @@ +6: d3: mtu 1500 master br0 state forwarding priority 32 cost 9 +7: mk0: mtu 1500 +Deleted 6: d3: mtu 1500 master br0 +02:00:00:00:0a:01 dev d1 vlan 10 master br0 static +Deleted 02:00:00:00:0a:01 dev d2 vlan 10 master br0 static +00:00:00:00:00:00 dev d1 dst 192.0.2.2 port 4790 vni 200 self permanent +dev br0 port d1 grp 239.1.1.1 permanent vid 10 +dev br0 port d2 grp 01:02:03:04:05:06 permanent vid 10 +Deleted dev br0 port d1 grp 239.1.1.1 permanent vid 10 +router port dev d2 master br0 +d1 20 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off +d2 30-32 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off +Deleted d1 20 + state disabled +br0 10 + mcast_snooping 1 mcast_querier 0 mcast_igmp_version 3 mcast_mld_version 1 mcast_last_member_count 2 mcast_last_member_interval 100 mcast_startup_query_count 2 mcast_startup_query_interval 3125 mcast_membership_interval 26000 mcast_querier_interval 25500 mcast_query_interval 12500 mcast_query_response_interval 1000 msti 0 +d1 500 +Deleted d1 500 +Timestamp: Thu Jan 1 00:00:00 1970 7 us diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-019/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-019/ip.pcap new file mode 100644 index 000000000..97b501b2d Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-019/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-019/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-019/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-019/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-019/m.bin b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-019/m.bin new file mode 100644 index 000000000..95521ab08 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-019/m.bin differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-020/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-020/cmd.json new file mode 100644 index 000000000..90912e850 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-020/cmd.json @@ -0,0 +1,68 @@ +{ + "axes": { + "fix": "file", + "mode": "file", + "words": "monitor file m.bin link" + }, + "cmd": "bridge monitor file m.bin link", + "desc": "corner: cmd=file:monitor_file_m.bin_link", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-020", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5", + "echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAAoAAAAAAAUADAAAAAAADAANAIAAAgAAAAEADAAOAIAAAgAAAAEABgAPAAOAAAAGABAAAAAAAAYAEQADgAAABgASAAMAAAAFABMAAAAAAAUAFAAAAAAABQAdAAAAAAAGAB8AAAAAAAUAIAAAAAAABQAjAAAAAAAFACQAAAAAAAUAIQAAAAAABQAnAAAAAAAFACgAAAAAAAUAKwAAAAAABQAtAAAAAAAMABUAAAAAAAAAAAAMABYA2wUAAAAAAAAMABcAAAAAAAAAAAAFABkAAQAAAAgAJQAAAgAACAAmAAAAAAAIACkAAAAAAAgAKgAAAAAADAAaAAgAAgAGAAEAzAUAABAAAAAAAAAAAAAAAAAAAQAHAAAAggAAAP////8IAAMAbWswAAgADQDoAwAABQAQAAIAAAAFABEAAAAAAAUAQwAAAAAACAAEANwFAAAIADIAAAAAAAgAMwAAAAAACAAbAAAAAAAIAB4AAAAAAAgAPQAAAAAACAAfAAEAAAAIACgA//8AAAgAKQAAAAEACAA6AAAAAQAIAD8AAAABAAgAQAAAAAEACAA7AAAAAQAIAD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AAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + }, + { + "cmd": "echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAAoAAAAAAAUADAAAAAAADAANAIAAAgAAAAEADAAOAIAAAgAAAAEABgAPAAOAAAAGABAAAAAAAAYAEQADgAAABgASAAMAAAAFABMAAAAAAAUAFAAAAAAABQAdAAAAAAAGAB8AAAAAAAUAIAAAAAAABQAjAAAAAAAFACQAAAAAAAUAIQAAAAAABQAnAAAAAAAFACgAAAAAAAUAKwAAAAAABQAtAAAAAAAMABUAAAAAAAAAAAAMABYA2wUAAAAAAAA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AACAAHAAAAAAAIAAgAAAAAACQAAABxAAAAAAAAAAAAAAAHAAAABAAAAAwAAYAIAAEAAAAUAKQAAABwAAAAAAAAAAAAAAAHAAAAAwAAAIwAAoAGAAEACgAAAAUAAwABAAAABQAEAAMAAAAIAAYAAgAAAAgABwACAAAABQAPAAAAAAAMAAgAZAAAAAAAAAAMAAoAkGUAAAAAAAAMAAsAnGMAAAAAAAAMAAwA1DAAAAAAAAAMAA0A6AMAAAAAAAAMAA4ANQwAAAAAAAAFAAUAAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-020/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-020/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-020/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-020/ip.out new file mode 100644 index 000000000..c863a2bb9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-020/ip.out @@ -0,0 +1,21 @@ +6: d3: mtu 1500 master br0 state forwarding priority 32 cost 9 +7: mk0: mtu 1500 +Deleted 6: d3: mtu 1500 master br0 +02:00:00:00:0a:01 dev d1 vlan 10 master br0 static +Deleted 02:00:00:00:0a:01 dev d2 vlan 10 master br0 static +00:00:00:00:00:00 dev d1 dst 192.0.2.2 port 4790 vni 200 self permanent +dev br0 port d1 grp 239.1.1.1 permanent vid 10 +dev br0 port d2 grp 01:02:03:04:05:06 permanent vid 10 +Deleted dev br0 port d1 grp 239.1.1.1 permanent vid 10 +router port dev d2 master br0 +d1 20 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off +d2 30-32 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off +Deleted d1 20 + state disabled +br0 10 + mcast_snooping 1 mcast_querier 0 mcast_igmp_version 3 mcast_mld_version 1 mcast_last_member_count 2 mcast_last_member_interval 100 mcast_startup_query_count 2 mcast_startup_query_interval 3125 mcast_membership_interval 26000 mcast_querier_interval 25500 mcast_query_interval 12500 mcast_query_response_interval 1000 msti 0 +d1 500 +Deleted d1 500 +Timestamp: Thu Jan 1 00:00:00 1970 7 us diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-020/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-020/ip.pcap new file mode 100644 index 000000000..e455b8aa3 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-020/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-020/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-020/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-020/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-020/m.bin b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-020/m.bin new file mode 100644 index 000000000..95521ab08 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-020/m.bin differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-021/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-021/cmd.json new file mode 100644 index 000000000..28799f7d4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-021/cmd.json @@ -0,0 +1,68 @@ +{ + "axes": { + "fix": "file", + "mode": "file", + "words": "monitor file m.bin all" + }, + "cmd": "bridge monitor file m.bin all", + "desc": "corner: cmd=file:monitor_file_m.bin_all", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-021", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5", + "echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAAoAAAAAAAUADAAAAAAADAANAIAAAgAAAAEADAAOAIAAAgAAAAEABgAPAAOAAAAGABAAAAAAAAYAEQADgAAABgASAAMAAAAFABMAAAAAAAUAFAAAAAAABQAdAAAAAAAGAB8AAAAAAAUA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ABwAAAAAACAAIAAAAAABcAAAAcAAAAAAAAAAAAAAABwAAAAUAAABEAAGACAABAAAAHgAGAAIAIAAAAAUAAwADAAAABQAJAAAAAAAFAAoAAAAAAAUABgABAAAACAAHAAAAAAAIAAgAAAAAACQAAABxAAAAAAAAAAAAAAAHAAAABAAAAAwAAYAIAAEAAAAUAKQAAABwAAAAAAAAAAAAAAAHAAAAAwAAAIwAAoAGAAEACgAAAAUAAwABAAAABQAEAAMAAAAIAAYAAgAAAAgABwACAAAABQAPAAAAAAAMAAgAZAAAAAAAAAAMAAoAkGUAAAAAAAAMAAsAnGMAAAAAAAAMAAwA1DAAAAAAAAAMAA0A6AMAAAAAAAAMAA4ANQwAAAAAAAAFAAUAAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + }, + { + "cmd": "echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAA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AFAAAAAQAKAAECAwQFBgAAAAAAAAAAAAAAAAAACAABAAAAAAAFAAUABAAAAFgAAABVAAAAAAAAAAAAAAAHAAAAAwAAAEAAAQA8AAEAOAABAAQAAAABAAoA7wEBAQAAAAAAAAAAAAAAAAgAAAAIAAEAAAAAAAUABQAEAAAABQADAAAAAAAkAAAAVAAAAAAAAAAAAAAABwAAAAMAAAAMAAIACAABAAUAAABUAAAAcAAAAAAAAAAAAAAABwAAAAQAAAA8AAGACAABAAAAFAAFAAMAAwAAAAUACQAAAAAABQAKAAAAAAAFAAYAAQAAAAgABwAAAAAACAAIAAAAAABcAAAAcAAAAAAAAAAAAAAABwAAAAUAAABEAAGACAABAAAAHgAGAAIAIAAAAAUAAwADAAAABQAJAAAAAAAFAAoAAAAAAAUABgABAAAACAAHAAAAAAAIAAgAAAAAACQAAABxAAAAAAAAAAAAAAAHAAAABAAAAAwAAYAIAAEAAAAUAKQAAABwAAAAAAAAAAAAAAAHAAAAAwAAAIwAAoAGAAEACgAAAAUAAwABAAAABQAEAAMAAAAIAAYAAgAAAAgABwACAAAABQAPAAAAAAAMAAgAZAAAAAAAAAAMAAoAkGUAAAAAAAAMAAsAnGMAAAAAAAAMAAwA1DAAAAAAAAAMAA0A6AMAAAAAAAAMAA4ANQwAAAAAAAAFAAUAAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-021/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-021/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-021/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-021/ip.out new file mode 100644 index 000000000..8922dbdf5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-021/ip.out @@ -0,0 +1,21 @@ +[LINK]6: d3: mtu 1500 master br0 state forwarding priority 32 cost 9 +[LINK]7: mk0: mtu 1500 +[LINK]Deleted 6: d3: mtu 1500 master br0 +[NEIGH]02:00:00:00:0a:01 dev d1 vlan 10 master br0 static +[NEIGH]Deleted 02:00:00:00:0a:01 dev d2 vlan 10 master br0 static +[NEIGH]00:00:00:00:00:00 dev d1 dst 192.0.2.2 port 4790 vni 200 self permanent +[MDB]dev br0 port d1 grp 239.1.1.1 permanent vid 10 +[MDB]dev br0 port d2 grp 01:02:03:04:05:06 permanent vid 10 +[MDB]Deleted dev br0 port d1 grp 239.1.1.1 permanent vid 10 +[MDB]router port dev d2 master br0 +[VLAN]d1 20 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off +[VLAN]d2 30-32 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off +[VLAN]Deleted d1 20 + state disabled +[VLAN]br0 10 + mcast_snooping 1 mcast_querier 0 mcast_igmp_version 3 mcast_mld_version 1 mcast_last_member_count 2 mcast_last_member_interval 100 mcast_startup_query_count 2 mcast_startup_query_interval 3125 mcast_membership_interval 26000 mcast_querier_interval 25500 mcast_query_interval 12500 mcast_query_response_interval 1000 msti 0 +[TUNNEL]d1 500 +[TUNNEL]Deleted d1 500 +Timestamp: Thu Jan 1 00:00:00 1970 7 us diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-021/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-021/ip.pcap new file mode 100644 index 000000000..07f5274ba Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-021/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-021/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-021/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-021/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-021/m.bin b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-021/m.bin new file mode 100644 index 000000000..95521ab08 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-021/m.bin differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-022/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-022/cmd.json new file mode 100644 index 000000000..30058cb8f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-022/cmd.json @@ -0,0 +1,68 @@ +{ + "axes": { + "fix": "file", + "mode": "file", + "words": "-t monitor file m.bin" + }, + "cmd": "bridge -t monitor file m.bin", + "desc": "corner: cmd=file:-t_monitor_file_m.bin", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-022", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5", + "echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAAoAAAAAAAUADAAAAAAADAANAIAAAgAAAAEADAAOAIAAAgAAAAEABgAPAAOAAAAGABAAAAAAAAYAEQADgAAABgASAAMAAAAFABMAAAAAAAUAFAAAAAAABQAdAAAAAAAGAB8AAAAAAAUAIAAAAAAABQAjAAAAAAAFACQAAAAAAAUAIQAAAAAABQAnAAAAAAAFACgAAAAAAAUAKwAAAAAABQAtAAAAAAAMABUAAAAAAAAAAAAMABYA2wUAAAAAAAAMABcAAAAAAAAAAAAFABkAAQAAAAgAJQAAAgAACAAmAAAAAAAIACkAAAAAAAgAKgAAAAAADAAaAAgAAgAGAAEAzAUAABAAAAAAAAAAAAAAAAAAAQAHAAAAggAAAP////8IAAMAbWswAAgADQDoAwAABQAQAAIAAAAFABEAAAAAAAUAQwAAAAAACAAEANwFAAAIADIAAAAAAAgAMwAAAAAACAAbAAAAAAAIAB4AAAAAAAgAPQAAAAAACAAfAAEAAAAIACgA//8AAAgAKQAAAAEACAA6AAAAAQAIAD8AAAABAAgAQAAAAAEACAA7AAAAAQAIADwA//8AAAgAQgAAAAAACAAgAAEAAAAFACEAAQAAAAgAIwAAAAAACAAvAAAAAAAIADAAAAAAAAYARAAAAAAABgBFAAAAAAAFACcAAAAAAAoAAQACAAAAAQ8AAAoAAg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AAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + }, + { + "cmd": "echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAAoAAAAAAAUADAAAAAAADAANAIAAAgAAAAEADAAOAIAAAgAAAAEABgAPAAOAAAAGABAAAAAAAAYAEQADgAAABgASAAMAAAAFABMAAAAAAAUAFAAAAAAABQAdAAAAAAAGAB8AAAAAAAUAIAAAAAAABQAjAAAAAAAFACQAAAAAAAUAIQAAAAAABQAnAAAAAAAFACgAAAAAAAUAKwAAAAAABQAtAAAAAAAMABUAAAAAAAAAAAAMABYA2wUAAAAAAAAMABcAAAAAAAAAAAAFABkAAQAAAAgAJQAAAgAACAAmAAAAAAAIACkAAAAAAAgAKgAAAAAADAAaAAgAAgAGAAEAzAUAABAAAAAAAAAAAAAAAAAAAQAHAAAAggAAAP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AwABAAAABQAEAAMAAAAIAAYAAgAAAAgABwACAAAABQAPAAAAAAAMAAgAZAAAAAAAAAAMAAoAkGUAAAAAAAAMAAsAnGMAAAAAAAAMAAwA1DAAAAAAAAAMAA0A6AMAAAAAAAAMAA4ANQwAAAAAAAAFAAUAAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-022/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-022/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-022/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-022/ip.out new file mode 100644 index 000000000..31e18ee51 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-022/ip.out @@ -0,0 +1,37 @@ +Timestamp: Fri Dec 4 08:11:31 2026 779147 usec +6: d3: mtu 1500 master br0 state forwarding priority 32 cost 9 +Timestamp: Fri Dec 4 08:11:31 2026 779223 usec +7: mk0: mtu 1500 +Timestamp: Fri Dec 4 08:11:31 2026 779228 usec +Deleted 6: d3: mtu 1500 master br0 +Timestamp: Fri Dec 4 08:11:31 2026 779231 usec +02:00:00:00:0a:01 dev d1 vlan 10 master br0 static +Timestamp: Fri Dec 4 08:11:31 2026 779255 usec +Deleted 02:00:00:00:0a:01 dev d2 vlan 10 master br0 static +Timestamp: Fri Dec 4 08:11:31 2026 779271 usec +00:00:00:00:00:00 dev d1 dst 192.0.2.2 port 4790 vni 200 self permanent +Timestamp: Fri Dec 4 08:11:31 2026 779276 usec +dev br0 port d1 grp 239.1.1.1 permanent vid 10 +Timestamp: Fri Dec 4 08:11:31 2026 779279 usec +dev br0 port d2 grp 01:02:03:04:05:06 permanent vid 10 +Timestamp: Fri Dec 4 08:11:31 2026 779282 usec +Deleted dev br0 port d1 grp 239.1.1.1 permanent vid 10 +Timestamp: Fri Dec 4 08:11:31 2026 779285 usec +router port dev d2 master br0 +Timestamp: Fri Dec 4 08:11:31 2026 779287 usec +d1 20 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off +Timestamp: Fri Dec 4 08:11:31 2026 779291 usec +d2 30-32 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off +Timestamp: Fri Dec 4 08:11:31 2026 779294 usec +Deleted d1 20 + state disabled +Timestamp: Fri Dec 4 08:11:31 2026 779296 usec +br0 10 + mcast_snooping 1 mcast_querier 0 mcast_igmp_version 3 mcast_mld_version 1 mcast_last_member_count 2 mcast_last_member_interval 100 mcast_startup_query_count 2 mcast_startup_query_interval 3125 mcast_membership_interval 26000 mcast_querier_interval 25500 mcast_query_interval 12500 mcast_query_response_interval 1000 msti 0 +Timestamp: Fri Dec 4 08:11:31 2026 779300 usec +d1 500 +Timestamp: Fri Dec 4 08:11:31 2026 779303 usec +Deleted d1 500 +Timestamp: Thu Jan 1 00:00:00 1970 7 us diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-022/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-022/ip.pcap new file mode 100644 index 000000000..625b03ef4 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-022/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-022/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-022/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-022/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-022/m.bin b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-022/m.bin new file mode 100644 index 000000000..95521ab08 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-022/m.bin differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-023/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-023/cmd.json new file mode 100644 index 000000000..fdc9ca756 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-023/cmd.json @@ -0,0 +1,68 @@ +{ + "axes": { + "fix": "file", + "mode": "file", + "words": "-j monitor file m.bin" + }, + "cmd": "bridge -j monitor file m.bin", + "desc": "corner: cmd=file:-j_monitor_file_m.bin", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-023", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 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EAAAAAAAUABQAEAAAABQADAAAAAABQAAAAVAAAAAAAAAAAAAAABwAAAAMAAAA4AAEANAABADAAAQAFAAAAAQAKAAECAwQFBgAAAAAAAAAAAAAAAAAACAABAAAAAAAFAAUABAAAAFgAAABVAAAAAAAAAAAAAAAHAAAAAwAAAEAAAQA8AAEAOAABAAQAAAABAAoA7wEBAQAAAAAAAAAAAAAAAAgAAAAIAAEAAAAAAAUABQAEAAAABQADAAAAAAAkAAAAVAAAAAAAAAAAAAAABwAAAAMAAAAMAAIACAABAAUAAABUAAAAcAAAAAAAAAAAAAAABwAAAAQAAAA8AAGACAABAAAAFAAFAAMAAwAAAAUACQAAAAAABQAKAAAAAAAFAAYAAQAAAAgABwAAAAAACAAIAAAAAABcAAAAcAAAAAAAAAAAAAAABwAAAAUAAABEAAGACAABAAAAHgAGAAIAIAAAAAUAAwADAAAABQAJAAAAAAAFAAoAAAAAAAUABgABAAAACAAHAAAAAAAIAAgAAAAAACQAAABxAAAAAAAAAAAAAAAHAAAABAAAAAwAAYAIAAEAAAAUAKQAAABwAAAAAAAAAAAAAAAHAAAAAwAAAIwAAoAGAAEACgAAAAUAAwABAAAABQAEAAMAAAAIAAYAAgAAAAgABwACAAAABQAPAAAAAAAMAAgAZAAAAAAAAAAMAAoAkGUAAAAAAAAMAAsAnGMAAAAAAAAMAAwA1DAAAAAAAAAMAA0A6AMAAAAAAAAMAA4ANQwAAAAAAAAFAAUAAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + }, + { + "cmd": "echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAAoAAAAAAAUADAAAAAAADAANAIAAAgAAAAEADAAOAIAAAgAAAAEABgAPAAOAAAAGABAAAAAAAAYAEQADgAAABgASAAMAAAAFABMAAAAAAAUAFAAAAAAABQAdAAAAAAAGAB8AAAAAAAUAIAAAAAAABQAjAAAAAAAFACQAAAAAAAUAIQAAAAAABQAnAAAAAAAFACgAAAAAAAUAKwAAAAAABQAtAAAAAAAMABUAAAAAAAAAAAAMABYA2wUAAAAAAAAMABcAAAAAAAAAAAAFABkAAQAAAAgAJQAAAgAACAAmAAAAAAAIACkAAAAAAAgAKgAAAAAADAAaAAgAAgAGAAEAzAUAABAAAAAAAAAAAAAAAAAAAQAHAAAAggAAAP////8IAAMAbWswAAgADQDoAwAABQAQAAIAAAAFABEAAAAAAAUAQwAAAAAACAAEANwFAAAIADIAAAAAAAgAMwAAAAAACAAbAAAAAAAIAB4AAAAAAAgAPQAAAAAACAAfAAEAAAAIACgA//8AAAgAKQAA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AAAAAAFAAUAAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-023/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-023/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-023/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-023/ip.out new file mode 100644 index 000000000..c863a2bb9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-023/ip.out @@ -0,0 +1,21 @@ +6: d3: mtu 1500 master br0 state forwarding priority 32 cost 9 +7: mk0: mtu 1500 +Deleted 6: d3: mtu 1500 master br0 +02:00:00:00:0a:01 dev d1 vlan 10 master br0 static +Deleted 02:00:00:00:0a:01 dev d2 vlan 10 master br0 static +00:00:00:00:00:00 dev d1 dst 192.0.2.2 port 4790 vni 200 self permanent +dev br0 port d1 grp 239.1.1.1 permanent vid 10 +dev br0 port d2 grp 01:02:03:04:05:06 permanent vid 10 +Deleted dev br0 port d1 grp 239.1.1.1 permanent vid 10 +router port dev d2 master br0 +d1 20 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off +d2 30-32 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off +Deleted d1 20 + state disabled +br0 10 + mcast_snooping 1 mcast_querier 0 mcast_igmp_version 3 mcast_mld_version 1 mcast_last_member_count 2 mcast_last_member_interval 100 mcast_startup_query_count 2 mcast_startup_query_interval 3125 mcast_membership_interval 26000 mcast_querier_interval 25500 mcast_query_interval 12500 mcast_query_response_interval 1000 msti 0 +d1 500 +Deleted d1 500 +Timestamp: Thu Jan 1 00:00:00 1970 7 us diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-023/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-023/ip.pcap new file mode 100644 index 000000000..78e149231 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-023/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-023/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-023/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-023/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-023/m.bin b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-023/m.bin new file mode 100644 index 000000000..95521ab08 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-023/m.bin differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-024/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-024/cmd.json new file mode 100644 index 000000000..d9b4af1a5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-024/cmd.json @@ -0,0 +1,68 @@ +{ + "axes": { + "fix": "file", + "mode": "file", + "words": "-d -s monitor file m.bin" + }, + "cmd": "bridge -d -s monitor file m.bin", + "desc": "positive: cmd=file:-d_-s_monitor_file_m.bin", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-024", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5", + "echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAAoAAAAAAAUADAAAAAAADAANAIAAAgAAAAEADAAOAIAAAgAAAAEABgAPAAOAAAAGABAAAAAAAAYAEQADgAAABgASAAMAAAAFABMAAAAAAAUAFAAAAAAABQAdAAAAAAAGAB8AAAAAAAUAIAAAAAAABQAjAAAAAAAFACQAAAAAAAUAIQAAAAAABQAnAAAAAAAFACgAAAAAAAUAKwAAAAAABQAtAAAAAAAMABUAAAAAAAAAAAAMABYA2wUAAAAAAAAMABcAAAAAAAAAAAAFABkAAQAAAAgAJQAAAgAACAAmAAAAAAAIACkAAAAAAAgAKgAAAAAADAAaAAgAAgAGAAEAzAUAABAAAAAAAAAAAAAAAAAAAQAHAAAAggAAAP////8IAAMAbWswAAgADQDoAw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AYAAgAAAAgABwACAAAABQAPAAAAAAAMAAgAZAAAAAAAAAAMAAoAkGUAAAAAAAAMAAsAnGMAAAAAAAAMAAwA1DAAAAAAAAAMAA0A6AMAAAAAAAAMAA4ANQwAAAAAAAAFAAUAAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + }, + { + "cmd": "echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAAoAAAAAAAUADAAAAAAADAANAIAAAgAAAAEADAAOAIAAAgAAAAEABgAPAAOAAAAGABAAAAAAAAYAEQADg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AAGACAABAAAAFAAFAAMAAwAAAAUACQAAAAAABQAKAAAAAAAFAAYAAQAAAAgABwAAAAAACAAIAAAAAABcAAAAcAAAAAAAAAAAAAAABwAAAAUAAABEAAGACAABAAAAHgAGAAIAIAAAAAUAAwADAAAABQAJAAAAAAAFAAoAAAAAAAUABgABAAAACAAHAAAAAAAIAAgAAAAAACQAAABxAAAAAAAAAAAAAAAHAAAABAAAAAwAAYAIAAEAAAAUAKQAAABwAAAAAAAAAAAAAAAHAAAAAwAAAIwAAoAGAAEACgAAAAUAAwABAAAABQAEAAMAAAAIAAYAAgAAAAgABwACAAAABQAPAAAAAAAMAAgAZAAAAAAAAAAMAAoAkGUAAAAAAAAMAAsAnGMAAAAAAAAMAAwA1DAAAAAAAAAMAA0A6AMAAAAAAAAMAA4ANQwAAAAAAAAFAAUAAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-024/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-024/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-024/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-024/ip.out new file mode 100644 index 000000000..84ee1c3ec --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-024/ip.out @@ -0,0 +1,28 @@ +6: d3: mtu 1500 master br0 state forwarding priority 32 cost 9 + hairpin off guard off root_block off fastleave off learning on flood on mcast_flood on bcast_flood on mcast_router 1 mcast_to_unicast off neigh_suppress off neigh_vlan_suppress off neigh_forward_grat off vlan_tunnel off isolated off locked off mab off mcast_n_groups 0 mcast_max_groups 0 +7: mk0: mtu 1500 +Deleted 6: d3: mtu 1500 master br0 +02:00:00:00:0a:01 dev d1 vlan 10 used 0/0 master br0 static +Deleted 02:00:00:00:0a:01 dev d2 vlan 10 used 0/0 master br0 static +00:00:00:00:00:00 dev d1 dst 192.0.2.2 port 4790 vni 200 used 0/0 self permanent +dev br0 port d1 grp 239.1.1.1 permanent filter_mode exclude proto static vid 10 0.00 +dev br0 port d2 grp 01:02:03:04:05:06 permanent proto static vid 10 0.00 +Deleted dev br0 port d1 grp 239.1.1.1 permanent filter_mode exclude proto static vid 10 0.00 +router port dev d2 master br0 +d1 20 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off + RX: 0 bytes 0 packets + TX: 0 bytes 0 packets +d2 30-32 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off + RX: 0 bytes 0 packets + TX: 0 bytes 0 packets +Deleted d1 20 + state disabled + RX: 0 bytes 0 packets + TX: 0 bytes 0 packets +br0 10 + mcast_snooping 1 mcast_querier 0 mcast_igmp_version 3 mcast_mld_version 1 mcast_last_member_count 2 mcast_last_member_interval 100 mcast_startup_query_count 2 mcast_startup_query_interval 3125 mcast_membership_interval 26000 mcast_querier_interval 25500 mcast_query_interval 12500 mcast_query_response_interval 1000 msti 0 +d1 500 +Deleted d1 500 +Timestamp: Thu Jan 1 00:00:00 1970 7 us diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-024/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-024/ip.pcap new file mode 100644 index 000000000..4e048b705 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-024/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-024/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-024/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-024/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-024/m.bin b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-024/m.bin new file mode 100644 index 000000000..95521ab08 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-024/m.bin differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-025/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-025/cmd.json new file mode 100644 index 000000000..c98b37ebd --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-025/cmd.json @@ -0,0 +1,68 @@ +{ + "axes": { + "fix": "one", + "mode": "file", + "words": "monitor file m.bin" + }, + "cmd": "bridge monitor file m.bin", + "desc": "boundary: cmd=one:monitor_file_m.bin", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-025", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5", + "echo VAAAABwAAAAAAAAAAAAAAAcAAAAEAAAAQAAAAAoAAgACAAAACgEAAAgACQADAAAACAAPAAAAAAAUAAMAAAAAAAAAAAAAAAAAAAAAAAYABQAKAAAA | base64 -d > m.bin" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + }, + { + "cmd": "echo VAAAABwAAAAAAAAAAAAAAAcAAAAEAAAAQAAAAAoAAgACAAAACgEAAAgACQADAAAACAAPAAAAAAAUAAMAAAAAAAAAAAAAAAAAAAAAAAYABQAKAAAA | base64 -d > m.bin", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-025/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-025/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-025/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-025/ip.out new file mode 100644 index 000000000..ec419cbea --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-025/ip.out @@ -0,0 +1 @@ +02:00:00:00:0a:01 dev d1 vlan 10 master br0 static diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-025/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-025/ip.pcap new file mode 100644 index 000000000..b16422765 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-025/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-025/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-025/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-025/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-025/m.bin b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-025/m.bin new file mode 100644 index 000000000..e146a1e6c Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-025/m.bin differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-026/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-026/cmd.json new file mode 100644 index 000000000..5650d48a1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-026/cmd.json @@ -0,0 +1,68 @@ +{ + "axes": { + "fix": "empty", + "mode": "file", + "words": "monitor file m.bin" + }, + "cmd": "bridge monitor file m.bin", + "desc": "boundary: cmd=empty:monitor_file_m.bin", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-026", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5", + ": > m.bin" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + }, + { + "cmd": ": > m.bin", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-026/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-026/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-026/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-026/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-026/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-026/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-026/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-026/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-026/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-026/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-026/m.bin b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-026/m.bin new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-027/b.txt b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-027/b.txt new file mode 100644 index 000000000..60e8398c7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-027/b.txt @@ -0,0 +1,2 @@ +fdb show dev d1 +monitor file m.bin diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-027/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-027/cmd.json new file mode 100644 index 000000000..99d9b1295 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-027/cmd.json @@ -0,0 +1,74 @@ +{ + "axes": { + "batch": "filter-then-file", + "fix": "file", + "mode": "file", + "words": "-batch b.txt" + }, + "cmd": "bridge -batch b.txt", + "desc": "corner: cmd=file:batch:filter-then-file", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-027", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5", + "echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAAoAAAAAAAUADAAAAAAADAANAIAAAgAAAAEADAAOAIAAAgAAAAEABgAPAAOAAAAGABAAAAAAAAYAEQADgAAABgASAAMAAAAFABMAAAAAAAUAFAAAAAAABQAdAAAAAAAGAB8AAAAAAAUAIAAAAAAABQAjAAAAAAAFACQAAAAAAAUAIQAAAAAABQAnAAAAAAAFACgAAAAAAAUAKwAAAAAABQAtAAAAAAAMABUAAAAAAAAAAAAMABYA2wUAAAAAAAAMABcAAAAAAAAAAAAFABkAAQAAAAgAJQAAAgAACAAmAAAAAAAIACkAAAAAAAgAKgAAAAAADAAaAAgAAgAGAAEAzAUAABAAAAAAAAAAAAAAAAAAAQAHAAAAggAAAP////8IAAMAb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AEAAMAAAAIAAYAAgAAAAgABwACAAAABQAPAAAAAAAMAAgAZAAAAAAAAAAMAAoAkGUAAAAAAAAMAAsAnGMAAAAAAAAMAAwA1DAAAAAAAAAMAA0A6AMAAAAAAAAMAA4ANQwAAAAAAAAFAAUAAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin", + "printf '%s\\n' 'fdb show dev d1' 'monitor file m.bin' > b.txt" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + }, + { + "cmd": "echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAAoAAAAAAAUADAAAAAAADAANAIA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MAAAAMAAIACAABAAUAAABUAAAAcAAAAAAAAAAAAAAABwAAAAQAAAA8AAGACAABAAAAFAAFAAMAAwAAAAUACQAAAAAABQAKAAAAAAAFAAYAAQAAAAgABwAAAAAACAAIAAAAAABcAAAAcAAAAAAAAAAAAAAABwAAAAUAAABEAAGACAABAAAAHgAGAAIAIAAAAAUAAwADAAAABQAJAAAAAAAFAAoAAAAAAAUABgABAAAACAAHAAAAAAAIAAgAAAAAACQAAABxAAAAAAAAAAAAAAAHAAAABAAAAAwAAYAIAAEAAAAUAKQAAABwAAAAAAAAAAAAAAAHAAAAAwAAAIwAAoAGAAEACgAAAAUAAwABAAAABQAEAAMAAAAIAAYAAgAAAAgABwACAAAABQAPAAAAAAAMAAgAZAAAAAAAAAAMAAoAkGUAAAAAAAAMAAsAnGMAAAAAAAAMAAwA1DAAAAAAAAAMAA0A6AMAAAAAAAAMAA4ANQwAAAAAAAAFAAUAAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin", + "rc": 0 + }, + { + "cmd": "printf '%s\\n' 'fdb show dev d1' 'monitor file m.bin' > b.txt", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-027/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-027/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-027/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-027/ip.out new file mode 100644 index 000000000..2a5bd58bd --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-027/ip.out @@ -0,0 +1,25 @@ +02:00:00:00:01:01 vlan 10 master br0 permanent +02:00:00:00:01:01 vlan 1 master br0 permanent +02:00:00:00:01:01 master br0 permanent +33:33:00:00:00:01 self permanent +01:00:5e:00:00:01 self permanent +6: d3: mtu 1500 master br0 state forwarding priority 32 cost 9 +7: mk0: mtu 1500 +Deleted 6: d3: mtu 1500 master br0 +02:00:00:00:0a:01 vlan 10 master br0 static +00:00:00:00:00:00 dst 192.0.2.2 port 4790 vni 200 self permanent +dev br0 port d1 grp 239.1.1.1 permanent vid 10 +dev br0 port d2 grp 01:02:03:04:05:06 permanent vid 10 +Deleted dev br0 port d1 grp 239.1.1.1 permanent vid 10 +router port dev d2 master br0 +d1 20 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off +d2 30-32 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off +Deleted d1 20 + state disabled +br0 10 + mcast_snooping 1 mcast_querier 0 mcast_igmp_version 3 mcast_mld_version 1 mcast_last_member_count 2 mcast_last_member_interval 100 mcast_startup_query_count 2 mcast_startup_query_interval 3125 mcast_membership_interval 26000 mcast_querier_interval 25500 mcast_query_interval 12500 mcast_query_response_interval 1000 msti 0 +d1 500 +Deleted d1 500 +Timestamp: Thu Jan 1 00:00:00 1970 7 us diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-027/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-027/ip.pcap new file mode 100644 index 000000000..cfa1e1d1a Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-027/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-027/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-027/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-027/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-027/m.bin b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-027/m.bin new file mode 100644 index 000000000..95521ab08 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-027/m.bin differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-028/b.txt b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-028/b.txt new file mode 100644 index 000000000..fa4fff428 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-028/b.txt @@ -0,0 +1,2 @@ +monitor file m.bin all +monitor file m.bin diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-028/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-028/cmd.json new file mode 100644 index 000000000..9e7dd3ce5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-028/cmd.json @@ -0,0 +1,74 @@ +{ + "axes": { + "batch": "all-then-file", + "fix": "file", + "mode": "file", + "words": "-batch b.txt" + }, + "cmd": "bridge -batch b.txt", + "desc": "corner: cmd=file:batch:all-then-file", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-028", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5", + "echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAAoAAAAAAAUADAAAAAAADAANAIAAAgAAAAEADAAOAIAAAgAAAAEABgAPAAOAAAAGABAAAAAAAAYAEQADgAAABgASAAMAAAAFABMAAAAAAAUAFAAAAAAABQAdAAAAAAAGAB8AAAAAAAUAIAAAAAAABQAjAAAAAAAFACQAAAAAAAUAIQAAAAAABQAnAAAAAAAFACgAAAAAAAUAKwAAAAAABQAtAAAAAAAMABUAAAAAAAAAAAAMABYA2wUAAAAAAAAMABcAAAAAAAAAAAAFABkAAQAAAAgAJQAAAgAACAAmAAAAAAAIACkAAAAAAAgAKgAAAAAADAAaAAgAAgAGAAEAzAUAABAAAAAAAAAAAAAAAAAAAQAHAAAAggAAAP////8IAAMAbWswAAgADQDoAwAABQAQAAIAAAAFABEAAAAAAAUAQwAAAAAACAAEANwFAAAIADIAAAAAAAgAMwAAAAAACAAbAAAAAAAIAB4AAAAAAAgAPQAAAAAACAAfAAEAAAAIACgA//8AAAgAKQAAAAEACAA6AAAAAQAIAD8AAAABAAgAQAAAAAEACAA7AAAAAQAIADwA//8AAAgAQgAAAAAACAAgAAEAAAAFACEAAQAAAAgAIwAAAAAACAAvAAAAAAAIADAAAAAAAAYARAAAAAAABgBFAAAAAA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AAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin", + "printf '%s\\n' 'monitor file m.bin all' 'monitor file m.bin' > b.txt" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + }, + { + "cmd": "echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAAoAAAAAAAUADAAAAAAADAANAIAAAgAAAAEADAAOAIAAAgAAAAEABgAPAAOAAAAGABAAAAAAAAYAEQADgAAABgASAAMAAAAFABMAAAAAAAUAFAAAAAAABQAdAAAAAAAGAB8AAAAAAAUAIAAAAAAABQAjAAAAAAAFACQAAAAAAAUAIQAAAAAABQAnAAAAAAAFACgAAAAAAAUAKwAAAAAABQAtAAAAAAAMABUAAAAAAAAAAAAMABYA2wUAAAAAAAAMABcAAAAAAAAAAAAFABkAAQAAAAgAJQAAAgAACAAmAAAAAAA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AABAAAAAwAAYAIAAEAAAAUAKQAAABwAAAAAAAAAAAAAAAHAAAAAwAAAIwAAoAGAAEACgAAAAUAAwABAAAABQAEAAMAAAAIAAYAAgAAAAgABwACAAAABQAPAAAAAAAMAAgAZAAAAAAAAAAMAAoAkGUAAAAAAAAMAAsAnGMAAAAAAAAMAAwA1DAAAAAAAAAMAA0A6AMAAAAAAAAMAA4ANQwAAAAAAAAFAAUAAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin", + "rc": 0 + }, + { + "cmd": "printf '%s\\n' 'monitor file m.bin all' 'monitor file m.bin' > b.txt", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-028/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-028/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-028/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-028/ip.out new file mode 100644 index 000000000..04b61de98 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-028/ip.out @@ -0,0 +1,42 @@ +[LINK]6: d3: mtu 1500 master br0 state forwarding priority 32 cost 9 +[LINK]7: mk0: mtu 1500 +[LINK]Deleted 6: d3: mtu 1500 master br0 +[NEIGH]02:00:00:00:0a:01 dev d1 vlan 10 master br0 static +[NEIGH]Deleted 02:00:00:00:0a:01 dev d2 vlan 10 master br0 static +[NEIGH]00:00:00:00:00:00 dev d1 dst 192.0.2.2 port 4790 vni 200 self permanent +[MDB]dev br0 port d1 grp 239.1.1.1 permanent vid 10 +[MDB]dev br0 port d2 grp 01:02:03:04:05:06 permanent vid 10 +[MDB]Deleted dev br0 port d1 grp 239.1.1.1 permanent vid 10 +[MDB]router port dev d2 master br0 +[VLAN]d1 20 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off +[VLAN]d2 30-32 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off +[VLAN]Deleted d1 20 + state disabled +[VLAN]br0 10 + mcast_snooping 1 mcast_querier 0 mcast_igmp_version 3 mcast_mld_version 1 mcast_last_member_count 2 mcast_last_member_interval 100 mcast_startup_query_count 2 mcast_startup_query_interval 3125 mcast_membership_interval 26000 mcast_querier_interval 25500 mcast_query_interval 12500 mcast_query_response_interval 1000 msti 0 +[TUNNEL]d1 500 +[TUNNEL]Deleted d1 500 +Timestamp: Thu Jan 1 00:00:00 1970 7 us +[LINK]6: d3: mtu 1500 master br0 state forwarding priority 32 cost 9 +[LINK]7: mk0: mtu 1500 +[LINK]Deleted 6: d3: mtu 1500 master br0 +[NEIGH]02:00:00:00:0a:01 dev d1 vlan 10 master br0 static +[NEIGH]Deleted 02:00:00:00:0a:01 dev d2 vlan 10 master br0 static +[NEIGH]00:00:00:00:00:00 dev d1 dst 192.0.2.2 port 4790 vni 200 self permanent +[MDB]dev br0 port d1 grp 239.1.1.1 permanent vid 10 +[MDB]dev br0 port d2 grp 01:02:03:04:05:06 permanent vid 10 +[MDB]Deleted dev br0 port d1 grp 239.1.1.1 permanent vid 10 +[MDB]router port dev d2 master br0 +[VLAN]d1 20 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off +[VLAN]d2 30-32 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off +[VLAN]Deleted d1 20 + state disabled +[VLAN]br0 10 + mcast_snooping 1 mcast_querier 0 mcast_igmp_version 3 mcast_mld_version 1 mcast_last_member_count 2 mcast_last_member_interval 100 mcast_startup_query_count 2 mcast_startup_query_interval 3125 mcast_membership_interval 26000 mcast_querier_interval 25500 mcast_query_interval 12500 mcast_query_response_interval 1000 msti 0 +[TUNNEL]d1 500 +[TUNNEL]Deleted d1 500 +Timestamp: Thu Jan 1 00:00:00 1970 7 us diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-028/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-028/ip.pcap new file mode 100644 index 000000000..28ff53d2b Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-028/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-028/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-028/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-028/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-028/m.bin b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-028/m.bin new file mode 100644 index 000000000..95521ab08 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-028/m.bin differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-029/b.txt b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-029/b.txt new file mode 100644 index 000000000..9b381a37e --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-029/b.txt @@ -0,0 +1,2 @@ +fdb show +monitor file m.bin diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-029/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-029/cmd.json new file mode 100644 index 000000000..53f12ac27 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-029/cmd.json @@ -0,0 +1,74 @@ +{ + "axes": { + "batch": "show-then-stamped-file", + "fix": "file", + "mode": "file", + "words": "-t -batch b.txt" + }, + "cmd": "bridge -t -batch b.txt", + "desc": "corner: cmd=file:batch:show-then-stamped-file", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-029", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5", + "echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAAoAAAAAAAUADAAAAAAADAANAIAAAgAAAAEADAAOAIAAAgAAAAEABgAPAAOAAAAGABAAAAAAAAYAEQADgAAABgASAAMAAAAFABMAAAAAAAUAFAAAAAAABQAdAAAAAAAGAB8AAAAA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AAAgABwAAAAAACAAIAAAAAABcAAAAcAAAAAAAAAAAAAAABwAAAAUAAABEAAGACAABAAAAHgAGAAIAIAAAAAUAAwADAAAABQAJAAAAAAAFAAoAAAAAAAUABgABAAAACAAHAAAAAAAIAAgAAAAAACQAAABxAAAAAAAAAAAAAAAHAAAABAAAAAwAAYAIAAEAAAAUAKQAAABwAAAAAAAAAAAAAAAHAAAAAwAAAIwAAoAGAAEACgAAAAUAAwABAAAABQAEAAMAAAAIAAYAAgAAAAgABwACAAAABQAPAAAAAAAMAAgAZAAAAAAAAAAMAAoAkGUAAAAAAAAMAAsAnGMAAAAAAAAMAAwA1DAAAAAAAAAMAA0A6AMAAAAAAAAMAA4ANQwAAAAAAAAFAAUAAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin", + "printf '%s\\n' 'fdb show' 'monitor file m.bin' > b.txt" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + }, + { + "cmd": "echo sAEAABAAAAAAAA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AVAAAAAAAAAAAAAAABwAAAAMAAAA4AAEANAABADAAAQAFAAAAAQAKAAECAwQFBgAAAAAAAAAAAAAAAAAACAABAAAAAAAFAAUABAAAAFgAAABVAAAAAAAAAAAAAAAHAAAAAwAAAEAAAQA8AAEAOAABAAQAAAABAAoA7wEBAQAAAAAAAAAAAAAAAAgAAAAIAAEAAAAAAAUABQAEAAAABQADAAAAAAAkAAAAVAAAAAAAAAAAAAAABwAAAAMAAAAMAAIACAABAAUAAABUAAAAcAAAAAAAAAAAAAAABwAAAAQAAAA8AAGACAABAAAAFAAFAAMAAwAAAAUACQAAAAAABQAKAAAAAAAFAAYAAQAAAAgABwAAAAAACAAIAAAAAABcAAAAcAAAAAAAAAAAAAAABwAAAAUAAABEAAGACAABAAAAHgAGAAIAIAAAAAUAAwADAAAABQAJAAAAAAAFAAoAAAAAAAUABgABAAAACAAHAAAAAAAIAAgAAAAAACQAAABxAAAAAAAAAAAAAAAHAAAABAAAAAwAAYAIAAEAAAAUAKQAAABwAAAAAAAAAAAAAAAHAAAAAwAAAIwAAoAGAAEACgAAAAUAAwABAAAABQAEAAMAAAAIAAYAAgAAAAgABwACAAAABQAPAAAAAAAMAAgAZAAAAAAAAAAMAAoAkGUAAAAAAAAMAAsAnGMAAAAAAAAMAAwA1DAAAAAAAAAMAA0A6AMAAAAAAAAMAA4ANQwAAAAAAAAFAAUAAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin", + "rc": 0 + }, + { + "cmd": "printf '%s\\n' 'fdb show' 'monitor file m.bin' > b.txt", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-029/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-029/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-029/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-029/ip.out new file mode 100644 index 000000000..329d31e1f --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-029/ip.out @@ -0,0 +1,39 @@ +33:33:00:00:00:01 dev br0 self permanent +01:00:5e:00:00:6a dev br0 self permanent +33:33:00:00:00:6a dev br0 self permanent +01:00:5e:00:00:01 dev br0 self permanent +02:00:00:00:01:00 dev br0 vlan 1 master br0 permanent +02:00:00:00:01:00 dev br0 master br0 permanent +02:00:00:00:01:01 dev d1 vlan 10 master br0 permanent +02:00:00:00:01:01 dev d1 vlan 1 master br0 permanent +02:00:00:00:01:01 dev d1 master br0 permanent +33:33:00:00:00:01 dev d1 self permanent +01:00:5e:00:00:01 dev d1 self permanent +02:00:00:00:01:02 dev d2 vlan 10 master br0 permanent +02:00:00:00:01:02 dev d2 vlan 1 master br0 permanent +02:00:00:00:01:02 dev d2 master br0 permanent +33:33:00:00:00:01 dev d2 self permanent +01:00:5e:00:00:01 dev d2 self permanent +33:33:00:00:00:01 dev d3 self permanent +01:00:5e:00:00:01 dev d3 self permanent +6: d3: mtu 1500 master br0 state forwarding priority 32 cost 9 +7: mk0: mtu 1500 +Deleted 6: d3: mtu 1500 master br0 +02:00:00:00:0a:01 dev d1 vlan 10 master br0 static +Deleted 02:00:00:00:0a:01 dev d2 vlan 10 master br0 static +00:00:00:00:00:00 dev d1 dst 192.0.2.2 port 4790 vni 200 self permanent +dev br0 port d1 grp 239.1.1.1 permanent vid 10 +dev br0 port d2 grp 01:02:03:04:05:06 permanent vid 10 +Deleted dev br0 port d1 grp 239.1.1.1 permanent vid 10 +router port dev d2 master br0 +d1 20 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off +d2 30-32 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off +Deleted d1 20 + state disabled +br0 10 + mcast_snooping 1 mcast_querier 0 mcast_igmp_version 3 mcast_mld_version 1 mcast_last_member_count 2 mcast_last_member_interval 100 mcast_startup_query_count 2 mcast_startup_query_interval 3125 mcast_membership_interval 26000 mcast_querier_interval 25500 mcast_query_interval 12500 mcast_query_response_interval 1000 msti 0 +d1 500 +Deleted d1 500 +Timestamp: Thu Jan 1 00:00:00 1970 7 us diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-029/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-029/ip.pcap new file mode 100644 index 000000000..cd1fe1bd4 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-029/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-029/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-029/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-029/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-029/m.bin b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-029/m.bin new file mode 100644 index 000000000..95521ab08 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-029/m.bin differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-030/b.txt b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-030/b.txt new file mode 100644 index 000000000..fd16ee9d2 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-030/b.txt @@ -0,0 +1,2 @@ +monitor file m.bin +monitor file m.bin link diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-030/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-030/cmd.json new file mode 100644 index 000000000..2342f37bc --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-030/cmd.json @@ -0,0 +1,74 @@ +{ + "axes": { + "batch": "file-then-file", + "fix": "file", + "mode": "file", + "words": "-batch b.txt" + }, + "cmd": "bridge -batch b.txt", + "desc": "corner: cmd=file:batch:file-then-file", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 0, + "refused_by": "none" + }, + "id": "brmonitor/ec-030", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5", + "echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAA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AVAAAAAAAAAAAAAAABwAAAAMAAAAMAAIACAABAAUAAABUAAAAcAAAAAAAAAAAAAAABwAAAAQAAAA8AAGACAABAAAAFAAFAAMAAwAAAAUACQAAAAAABQAKAAAAAAAFAAYAAQAAAAgABwAAAAAACAAIAAAAAABcAAAAcAAAAAAAAAAAAAAABwAAAAUAAABEAAGACAABAAAAHgAGAAIAIAAAAAUAAwADAAAABQAJAAAAAAAFAAoAAAAAAAUABgABAAAACAAHAAAAAAAIAAgAAAAAACQAAABxAAAAAAAAAAAAAAAHAAAABAAAAAwAAYAIAAEAAAAUAKQAAABwAAAAAAAAAAAAAAAHAAAAAwAAAIwAAoAGAAEACgAAAAUAAwABAAAABQAEAAMAAAAIAAYAAgAAAAgABwACAAAABQAPAAAAAAAMAAgAZAAAAAAAAAAMAAoAkGUAAAAAAAAMAAsAnGMAAAAAAAAMAAwA1DAAAAAAAAAMAA0A6AMAAAAAAAAMAA4ANQwAAAAAAAAFAAUAAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin", + "printf '%s\\n' 'monitor file m.bin' 'monitor file m.bin link' > b.txt" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + }, + { + "cmd": "echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAAoAAAAAAAUADAAAAAAADAANAIAAAgAAAAEADAAOAIAAAgAAAAEABgAPAAOAAAAGABAAAAAAAAYAEQADgAAABgASAAMAAAAFABMAAAAAAAUAFAAAAAAABQAdAAAAAAAGAB8AAAAAAAUAIAAAAAAABQAjAAAAAAAFACQAAAAAAAUAIQAAAAAABQAnAAAAAAAFACgAAAAAAAUAKwAAAAAABQAtAAAAAAAMABUAAAAAAAAAAAAMABYA2wUAAAAAAAAMABcAAAAAAAAAAAAFABkAAQAAAAgAJQAAAgAACAAmAAAAAAAIACkAAAAAAAgAKgAAAAAADAAaAAgAAgAGAAEAzAUAABAAAAAAAAAAAAAAAAAAAQAHAAAAggAAAP////8IAAMAbWswAAgADQDoAwAABQAQAAIAAAAFABEAAAAAAAUAQwAAAAAACAAEANwFAAAIADIAAAAAAAgAMwAAAAAACAAbAAAAAAAIAB4AAAAAAAgAPQAAAAAACAAfAAEAAAAIACgA//8AAAgAKQAAAAEACAA6AAAAAQAIAD8AAAABAAgAQAAAAAEACAA7AAAAAQAIADwA//8AAAgAQgAAAAAACAAgAAEAAAAFACEAAQAAAAgAIwAAAAAACAAvAAAAAAAIADAAAAAAAAYARAAAAAAABgBFAAAAAAAFACcAAAAAAAoAAQACAAAAAQ8AAAoAAgD///////8AAMwAFwAAAAAAAAAAAAAAAAAAAAAAAAAA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in", + "rc": 0 + }, + { + "cmd": "printf '%s\\n' 'monitor file m.bin' 'monitor file m.bin link' > b.txt", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-030/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-030/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-030/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-030/ip.out new file mode 100644 index 000000000..bd343c4d0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-030/ip.out @@ -0,0 +1,42 @@ +6: d3: mtu 1500 master br0 state forwarding priority 32 cost 9 +7: mk0: mtu 1500 +Deleted 6: d3: mtu 1500 master br0 +02:00:00:00:0a:01 dev d1 vlan 10 master br0 static +Deleted 02:00:00:00:0a:01 dev d2 vlan 10 master br0 static +00:00:00:00:00:00 dev d1 dst 192.0.2.2 port 4790 vni 200 self permanent +dev br0 port d1 grp 239.1.1.1 permanent vid 10 +dev br0 port d2 grp 01:02:03:04:05:06 permanent vid 10 +Deleted dev br0 port d1 grp 239.1.1.1 permanent vid 10 +router port dev d2 master br0 +d1 20 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off +d2 30-32 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off +Deleted d1 20 + state disabled +br0 10 + mcast_snooping 1 mcast_querier 0 mcast_igmp_version 3 mcast_mld_version 1 mcast_last_member_count 2 mcast_last_member_interval 100 mcast_startup_query_count 2 mcast_startup_query_interval 3125 mcast_membership_interval 26000 mcast_querier_interval 25500 mcast_query_interval 12500 mcast_query_response_interval 1000 msti 0 +d1 500 +Deleted d1 500 +Timestamp: Thu Jan 1 00:00:00 1970 7 us +6: d3: mtu 1500 master br0 state forwarding priority 32 cost 9 +7: mk0: mtu 1500 +Deleted 6: d3: mtu 1500 master br0 +02:00:00:00:0a:01 dev d1 vlan 10 master br0 static +Deleted 02:00:00:00:0a:01 dev d2 vlan 10 master br0 static +00:00:00:00:00:00 dev d1 dst 192.0.2.2 port 4790 vni 200 self permanent +dev br0 port d1 grp 239.1.1.1 permanent vid 10 +dev br0 port d2 grp 01:02:03:04:05:06 permanent vid 10 +Deleted dev br0 port d1 grp 239.1.1.1 permanent vid 10 +router port dev d2 master br0 +d1 20 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off +d2 30-32 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off +Deleted d1 20 + state disabled +br0 10 + mcast_snooping 1 mcast_querier 0 mcast_igmp_version 3 mcast_mld_version 1 mcast_last_member_count 2 mcast_last_member_interval 100 mcast_startup_query_count 2 mcast_startup_query_interval 3125 mcast_membership_interval 26000 mcast_querier_interval 25500 mcast_query_interval 12500 mcast_query_response_interval 1000 msti 0 +d1 500 +Deleted d1 500 +Timestamp: Thu Jan 1 00:00:00 1970 7 us diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-030/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-030/ip.pcap new file mode 100644 index 000000000..24be6e0d3 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-030/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-030/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-030/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-030/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-030/m.bin b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-030/m.bin new file mode 100644 index 000000000..95521ab08 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ec-030/m.bin differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-001/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-001/cmd.json new file mode 100644 index 000000000..88d01ea61 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-001/cmd.json @@ -0,0 +1,34 @@ +{ + "axes": { + "fix": "bare", + "mode": "file", + "words": "monitor help" + }, + "cmd": "bridge monitor help", + "desc": "negative: cmd=ng:bare:monitor_help: help prints the usage and exits 255 (B72)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "brmonitor/ng-001", + "modules": [ + "bridge", + "vxlan" + ], + "proto": "route", + "result": { + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-001/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-001/ip.err new file mode 100644 index 000000000..d171f603a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-001/ip.err @@ -0,0 +1 @@ +Usage: bridge monitor [file | link | fdb | mdb | vlan | vni | all] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-001/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-001/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-001/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-001/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-001/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-001/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-001/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-001/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-002/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-002/cmd.json new file mode 100644 index 000000000..22a09c1a7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-002/cmd.json @@ -0,0 +1,34 @@ +{ + "axes": { + "fix": "bare", + "mode": "file", + "words": "monitor h" + }, + "cmd": "bridge monitor h", + "desc": "negative: cmd=ng:bare:monitor_h: h is help by prefix, past every selector (B59)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "brmonitor/ng-002", + "modules": [ + "bridge", + "vxlan" + ], + "proto": "route", + "result": { + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-002/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-002/ip.err new file mode 100644 index 000000000..d171f603a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-002/ip.err @@ -0,0 +1 @@ +Usage: bridge monitor [file | link | fdb | mdb | vlan | vni | all] diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-002/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-002/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-002/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-002/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-002/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-002/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-002/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-002/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-003/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-003/cmd.json new file mode 100644 index 000000000..d7a9942a7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-003/cmd.json @@ -0,0 +1,34 @@ +{ + "axes": { + "fix": "bare", + "mode": "file", + "words": "monitor f" + }, + "cmd": "bridge monitor f", + "desc": "negative: cmd=ng:bare:monitor_f: f is file, not fdb, and takes the next word (B59)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "brmonitor/ng-003", + "modules": [ + "bridge", + "vxlan" + ], + "proto": "route", + "result": { + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-003/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-003/ip.err new file mode 100644 index 000000000..f7d546177 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-003/ip.err @@ -0,0 +1 @@ +Command line is not complete. Try option "help" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-003/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-003/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-003/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-003/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-003/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-003/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-003/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-003/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-004/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-004/cmd.json new file mode 100644 index 000000000..bc74e0aa0 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-004/cmd.json @@ -0,0 +1,34 @@ +{ + "axes": { + "fix": "bare", + "mode": "file", + "words": "monitor fdbx" + }, + "cmd": "bridge monitor fdbx", + "desc": "negative: cmd=ng:bare:monitor_fdbx: an unknown word", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "brmonitor/ng-004", + "modules": [ + "bridge", + "vxlan" + ], + "proto": "route", + "result": { + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-004/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-004/ip.err new file mode 100644 index 000000000..a5c293654 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-004/ip.err @@ -0,0 +1 @@ +Argument "fdbx" is unknown, try "bridge monitor help". diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-004/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-004/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-004/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-004/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-004/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-004/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-004/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-004/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-005/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-005/cmd.json new file mode 100644 index 000000000..72e33f105 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-005/cmd.json @@ -0,0 +1,34 @@ +{ + "axes": { + "fix": "bare", + "mode": "file", + "words": "monitor a" + }, + "cmd": "bridge monitor a", + "desc": "negative: cmd=ng:bare:monitor_a: all is strcmp: a is unknown (B59)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "brmonitor/ng-005", + "modules": [ + "bridge", + "vxlan" + ], + "proto": "route", + "result": { + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-005/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-005/ip.err new file mode 100644 index 000000000..50ad48682 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-005/ip.err @@ -0,0 +1 @@ +Argument "a" is unknown, try "bridge monitor help". diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-005/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-005/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-005/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-005/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-005/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-005/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-005/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-005/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-006/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-006/cmd.json new file mode 100644 index 000000000..a4d64b6ea --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-006/cmd.json @@ -0,0 +1,34 @@ +{ + "axes": { + "fix": "bare", + "mode": "file", + "words": "monitor vn" + }, + "cmd": "bridge monitor vn", + "desc": "negative: cmd=ng:bare:monitor_vn: vni is strcmp and vn no prefix of vlan: unknown (B59)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "brmonitor/ng-006", + "modules": [ + "bridge", + "vxlan" + ], + "proto": "route", + "result": { + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-006/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-006/ip.err new file mode 100644 index 000000000..579e70005 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-006/ip.err @@ -0,0 +1 @@ +Argument "vn" is unknown, try "bridge monitor help". diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-006/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-006/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-006/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-006/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-006/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-006/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-006/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-006/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-007/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-007/cmd.json new file mode 100644 index 000000000..9478e2141 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-007/cmd.json @@ -0,0 +1,34 @@ +{ + "axes": { + "fix": "bare", + "mode": "file", + "words": "monitor file" + }, + "cmd": "bridge monitor file", + "desc": "negative: cmd=ng:bare:monitor_file: file with no value (B72)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "brmonitor/ng-007", + "modules": [ + "bridge", + "vxlan" + ], + "proto": "route", + "result": { + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-007/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-007/ip.err new file mode 100644 index 000000000..f7d546177 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-007/ip.err @@ -0,0 +1 @@ +Command line is not complete. Try option "help" diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-007/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-007/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-007/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-007/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-007/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-007/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-007/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-007/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-008/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-008/cmd.json new file mode 100644 index 000000000..bce1b0bce --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-008/cmd.json @@ -0,0 +1,34 @@ +{ + "axes": { + "fix": "bare", + "mode": "file", + "words": "monitor file /nonexistent" + }, + "cmd": "bridge monitor file /nonexistent", + "desc": "negative: cmd=ng:bare:monitor_file_/nonexistent: Cannot fopen", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "brmonitor/ng-008", + "modules": [ + "bridge", + "vxlan" + ], + "proto": "route", + "result": { + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-008/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-008/ip.err new file mode 100644 index 000000000..8523a69c2 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-008/ip.err @@ -0,0 +1 @@ +Cannot fopen: No such file or directory diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-008/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-008/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-008/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-008/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-008/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-008/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-008/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-008/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-009/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-009/cmd.json new file mode 100644 index 000000000..ab7ae7b10 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-009/cmd.json @@ -0,0 +1,68 @@ +{ + "axes": { + "fix": "trunc", + "mode": "file", + "words": "monitor file m.bin" + }, + "cmd": "bridge monitor file m.bin", + "desc": "negative: cmd=ng:trunc:monitor_file_m.bin: a record cut inside its body", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "brmonitor/ng-009", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5", + "echo VAAAABwAAAAAAAAAAAAAAAcAAAAEAAAAQAAAAAoAAgACAAAACgEAAAgACQADAAAACAAPAAAAAAAUAAMAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + }, + { + "cmd": "echo VAAAABwAAAAAAAAAAAAAAAcAAAAEAAAAQAAAAAoAAgACAAAACgEAAAgACQADAAAACAAPAAAAAAAUAAMAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-009/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-009/ip.err new file mode 100644 index 000000000..5b5f42cf7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-009/ip.err @@ -0,0 +1 @@ +rtnl-from_file: truncated message diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-009/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-009/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-009/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-009/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-009/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-009/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-009/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-009/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-009/m.bin b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-009/m.bin new file mode 100644 index 000000000..08f8c7355 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-009/m.bin differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-010/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-010/cmd.json new file mode 100644 index 000000000..bfda45eb8 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-010/cmd.json @@ -0,0 +1,68 @@ +{ + "axes": { + "fix": "malformed", + "mode": "file", + "words": "monitor file m.bin" + }, + "cmd": "bridge monitor file m.bin", + "desc": "negative: cmd=ng:malformed:monitor_file_m.bin: a record whose length is under the header's", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "brmonitor/ng-010", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5", + "echo CAAAABwAAAAAAAAAAAAAAA== | base64 -d > m.bin" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + }, + { + "cmd": "echo CAAAABwAAAAAAAAAAAAAAA== | base64 -d > m.bin", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-010/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-010/ip.err new file mode 100644 index 000000000..65e1d87ce --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-010/ip.err @@ -0,0 +1 @@ +!!!malformed message: len=8 @16 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-010/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-010/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-010/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-010/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-010/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-010/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-010/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-010/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-010/m.bin b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-010/m.bin new file mode 100644 index 000000000..c9a0d34da Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-010/m.bin differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-011/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-011/cmd.json new file mode 100644 index 000000000..16abf6da4 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-011/cmd.json @@ -0,0 +1,69 @@ +{ + "axes": { + "fix": "missing", + "mode": "file", + "words": "monitor file m.bin" + }, + "cmd": "bridge monitor file m.bin", + "desc": "negative: cmd=ng:missing:monitor_file_m.bin: a record's ifindex the host lacks: ll_link_get's RTM_GETLINK gets ENODEV and the name is if9, rc 0 (B66)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "errno": "ENODEV", + "rc": 0, + "refused_by": "kernel-ignored" + }, + "id": "brmonitor/ng-011", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5", + "echo JAAAAHgAAAAAAAAAAAAAAAcAAAAJAAAADAABgAgAAQD0AQAA | base64 -d > m.bin" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + }, + { + "cmd": "echo JAAAAHgAAAAAAAAAAAAAAAcAAAAJAAAADAABgAgAAQD0AQAA | base64 -d > m.bin", + "rc": 0 + } + ], + "rc": 0, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-011/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-011/ip.err new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-011/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-011/ip.out new file mode 100644 index 000000000..67af44c52 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-011/ip.out @@ -0,0 +1 @@ +if9 500 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-011/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-011/ip.pcap new file mode 100644 index 000000000..a468f34f3 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-011/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-011/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-011/ip.rc new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-011/ip.rc @@ -0,0 +1 @@ +0 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-011/m.bin b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-011/m.bin new file mode 100644 index 000000000..515c5fa5e Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-011/m.bin differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-012/b.txt b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-012/b.txt new file mode 100644 index 000000000..208dd848c --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-012/b.txt @@ -0,0 +1,2 @@ +monitor file m.bin +vlan show diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-012/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-012/cmd.json new file mode 100644 index 000000000..a1ee099d1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-012/cmd.json @@ -0,0 +1,74 @@ +{ + "axes": { + "batch": "file-then-show", + "fix": "file", + "mode": "file", + "words": "-batch b.txt" + }, + "cmd": "bridge -batch b.txt", + "desc": "negative: cmd=ng:file:batch:file-then-show: monitor closed rth, so the show's dump request fails with EBADF and exits 1 (B63)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 1, + "refused_by": "ack-then-fail" + }, + "id": "brmonitor/ng-012", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5", + "echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAAoAAAAAAAUADAAAAAAADAANAIAAAgAAAAEADAAOAIAAAgAAAAEABgAPAAOAAAAGABAAAAAAAAYAEQADgAAABgASAAMAAAAFABMAAAAAAAUAFAAAAAAABQAdAAAAAAAGAB8AAAAAAAUAIAAAAAAABQAjAAAAAAAFACQAAAAAAAUAIQAAAAAABQAnAAAAAAAFACgAAAAAAAUAKwAAAAAABQAtAAAAAAAMABUAAAAAAAAAAAAMABYA2wUAAAAAAAAMABcAAAAAAAAAAAAFABkAAQAAAAgAJQAAAgAACAAmAAAAAAAIACkAAAAAAAgAKgAAAAAADAAaAAgAAgAGAAEAzAUAABAAAAAAAAAAAAAAAAAAAQAHAAAAggAAAP////8IAAMAbWswAAgADQDoAwAABQAQAAIAAAAFABEAAAAAAAUAQwAAAAAACAAEANwFAAAIADIAAAAAAAgAMwAAAAAACAAbAAAAAAAIAB4AAAAAAAgAPQAAAAAACAAfAAEAAAAIACgA//8AAAgAKQAAAAEACAA6AAAAAQAIAD8AAAABAAgAQAAAAAEACAA7AAAAAQAIADwA//8AAAgAQgAAAAAACAAgAAEAAAAFACEAAQAAAAgAIwAAAAAACAAvAAAAAAAIADAAAAAAAAYARAAAAAAABg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AA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin", + "printf '%s\\n' 'monitor file m.bin' 'vlan show' > b.txt" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + }, + { + "cmd": "echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAAoAAAAAAAUADAAAAAAADAANAIAAAgAAAAEADAAOAIAAAgAAAAEABgAPAAOAAAAGABAAAAAAAAYAEQADgAAABgASAAMAAAAFABMAAAAAAAUAFAAAAAAABQAdAAAAAAAGAB8AAAAAAAUAIAAAAAAABQAjAAAAAAAFACQAAAAAAAUAIQAAAAAABQAnAAAAAAAFACgAAAAAAAUAKwAAAAAABQAtAAAAAAAMABUAAAAAAAAAAAAMABYA2wUAAAAAAAAMABcAAAAAAAAAAAAFABkAAQAAAAgAJQAAAgAACAAmAAAA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HAAAABAAAAAwAAYAIAAEAAAAUAKQAAABwAAAAAAAAAAAAAAAHAAAAAwAAAIwAAoAGAAEACgAAAAUAAwABAAAABQAEAAMAAAAIAAYAAgAAAAgABwACAAAABQAPAAAAAAAMAAgAZAAAAAAAAAAMAAoAkGUAAAAAAAAMAAsAnGMAAAAAAAAMAAwA1DAAAAAAAAAMAA0A6AMAAAAAAAAMAA4ANQwAAAAAAAAFAAUAAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin", + "rc": 0 + }, + { + "cmd": "printf '%s\\n' 'monitor file m.bin' 'vlan show' > b.txt", + "rc": 0 + } + ], + "rc": 1, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-012/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-012/ip.err new file mode 100644 index 000000000..24d341c58 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-012/ip.err @@ -0,0 +1 @@ +Cannot send dump request: Bad file descriptor diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-012/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-012/ip.out new file mode 100644 index 000000000..c863a2bb9 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-012/ip.out @@ -0,0 +1,21 @@ +6: d3: mtu 1500 master br0 state forwarding priority 32 cost 9 +7: mk0: mtu 1500 +Deleted 6: d3: mtu 1500 master br0 +02:00:00:00:0a:01 dev d1 vlan 10 master br0 static +Deleted 02:00:00:00:0a:01 dev d2 vlan 10 master br0 static +00:00:00:00:00:00 dev d1 dst 192.0.2.2 port 4790 vni 200 self permanent +dev br0 port d1 grp 239.1.1.1 permanent vid 10 +dev br0 port d2 grp 01:02:03:04:05:06 permanent vid 10 +Deleted dev br0 port d1 grp 239.1.1.1 permanent vid 10 +router port dev d2 master br0 +d1 20 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off +d2 30-32 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off +Deleted d1 20 + state disabled +br0 10 + mcast_snooping 1 mcast_querier 0 mcast_igmp_version 3 mcast_mld_version 1 mcast_last_member_count 2 mcast_last_member_interval 100 mcast_startup_query_count 2 mcast_startup_query_interval 3125 mcast_membership_interval 26000 mcast_querier_interval 25500 mcast_query_interval 12500 mcast_query_response_interval 1000 msti 0 +d1 500 +Deleted d1 500 +Timestamp: Thu Jan 1 00:00:00 1970 7 us diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-012/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-012/ip.pcap new file mode 100644 index 000000000..5934660f8 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-012/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-012/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-012/ip.rc new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-012/ip.rc @@ -0,0 +1 @@ +1 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-012/m.bin b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-012/m.bin new file mode 100644 index 000000000..95521ab08 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-012/m.bin differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-013/b.txt b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-013/b.txt new file mode 100644 index 000000000..b540c6e2a --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-013/b.txt @@ -0,0 +1,2 @@ +monitor file m.bin all +fdb show diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-013/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-013/cmd.json new file mode 100644 index 000000000..041b128c1 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-013/cmd.json @@ -0,0 +1,74 @@ +{ + "axes": { + "batch": "all-then-show", + "fix": "file", + "mode": "file", + "words": "-batch b.txt" + }, + "cmd": "bridge -batch b.txt", + "desc": "negative: cmd=ng:file:batch:all-then-show: the banner would leak into the show, but B63's EBADF exits first (B62)", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 1, + "refused_by": "ack-then-fail" + }, + "id": "brmonitor/ng-013", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5", + "echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAA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wAAAAMAAAA4AAEANAABADAAAQAFAAAAAQAKAAECAwQFBgAAAAAAAAAAAAAAAAAACAABAAAAAAAFAAUABAAAAFgAAABVAAAAAAAAAAAAAAAHAAAAAwAAAEAAAQA8AAEAOAABAAQAAAABAAoA7wEBAQAAAAAAAAAAAAAAAAgAAAAIAAEAAAAAAAUABQAEAAAABQADAAAAAAAkAAAAVAAAAAAAAAAAAAAABwAAAAMAAAAMAAIACAABAAUAAABUAAAAcAAAAAAAAAAAAAAABwAAAAQAAAA8AAGACAABAAAAFAAFAAMAAwAAAAUACQAAAAAABQAKAAAAAAAFAAYAAQAAAAgABwAAAAAACAAIAAAAAABcAAAAcAAAAAAAAAAAAAAABwAAAAUAAABEAAGACAABAAAAHgAGAAIAIAAAAAUAAwADAAAABQAJAAAAAAAFAAoAAAAAAAUABgABAAAACAAHAAAAAAAIAAgAAAAAACQAAABxAAAAAAAAAAAAAAAHAAAABAAAAAwAAYAIAAEAAAAUAKQAAABwAAAAAAAAAAAAAAAHAAAAAwAAAIwAAoAGAAEACgAAAAUAAwABAAAABQAEAAMAAAAIAAYAAgAAAAgABwACAAAABQAPAAAAAAAMAAgAZAAAAAAAAAAMAAoAkGUAAAAAAAAMAAsAnGMAAAAAAAAMAAwA1DAAAAAAAAAMAA0A6AMAAAAAAAAMAA4ANQwAAAAAAAAFAAUAAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin", + "printf '%s\\n' 'monitor file m.bin all' 'fdb show' > b.txt" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + }, + { + "cmd": "echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAAoAAAAAAAUADAAAAAAADAANAIAAAgAAAAEADAAOAIAAAgAAAAEABgAPAAOAAAAGABAAAAAAAAYAEQADgAAABgASAAMAAAAFABMAAAAAAAUAFAAAAAAABQAdAAAAAAAGAB8AAAAAAAUAIAAAAAAABQAjAAAAAAAFACQAAAAAAAUAIQAAAAAABQAnAAAAAAAFACgAAAAAAAUAKwAAAAAABQAtAAAAAAAMABUAAAAAAAAAAAAMABYA2wUAAAAAAAAMABcAAAAAAAAAAAAFABkAAQAAAAgAJQAAAgAACAAmAAAAAAAIACkAAAAAAAgAKgAAAAAADAAaAAgAAgAGAAEAzAUAABAAAAAAAAAAAAAAAAAAAQAHAAAAggAAAP////8IAAMAbWswAAgADQDoAwAABQAQAAIAAAAFABEAAAAAAAUAQwAAAAAACAAEANwFAAAIADIAAAAAAAgAMwAAAAAACAAbAAAAAAAIAB4AAAAAAAgAPQAAAAAACAAfAAEAAAAIACgA//8AAAgAKQAAAAEACAA6AAA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AAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin", + "rc": 0 + }, + { + "cmd": "printf '%s\\n' 'monitor file m.bin all' 'fdb show' > b.txt", + "rc": 0 + } + ], + "rc": 1, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-013/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-013/ip.err new file mode 100644 index 000000000..24d341c58 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-013/ip.err @@ -0,0 +1 @@ +Cannot send dump request: Bad file descriptor diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-013/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-013/ip.out new file mode 100644 index 000000000..8922dbdf5 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-013/ip.out @@ -0,0 +1,21 @@ +[LINK]6: d3: mtu 1500 master br0 state forwarding priority 32 cost 9 +[LINK]7: mk0: mtu 1500 +[LINK]Deleted 6: d3: mtu 1500 master br0 +[NEIGH]02:00:00:00:0a:01 dev d1 vlan 10 master br0 static +[NEIGH]Deleted 02:00:00:00:0a:01 dev d2 vlan 10 master br0 static +[NEIGH]00:00:00:00:00:00 dev d1 dst 192.0.2.2 port 4790 vni 200 self permanent +[MDB]dev br0 port d1 grp 239.1.1.1 permanent vid 10 +[MDB]dev br0 port d2 grp 01:02:03:04:05:06 permanent vid 10 +[MDB]Deleted dev br0 port d1 grp 239.1.1.1 permanent vid 10 +[MDB]router port dev d2 master br0 +[VLAN]d1 20 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off +[VLAN]d2 30-32 + state forwarding mcast_router 1 mcast_n_groups 0 mcast_max_groups 0 neigh_suppress off neigh_forward_grat off +[VLAN]Deleted d1 20 + state disabled +[VLAN]br0 10 + mcast_snooping 1 mcast_querier 0 mcast_igmp_version 3 mcast_mld_version 1 mcast_last_member_count 2 mcast_last_member_interval 100 mcast_startup_query_count 2 mcast_startup_query_interval 3125 mcast_membership_interval 26000 mcast_querier_interval 25500 mcast_query_interval 12500 mcast_query_response_interval 1000 msti 0 +[TUNNEL]d1 500 +[TUNNEL]Deleted d1 500 +Timestamp: Thu Jan 1 00:00:00 1970 7 us diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-013/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-013/ip.pcap new file mode 100644 index 000000000..be8eb4e41 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-013/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-013/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-013/ip.rc new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-013/ip.rc @@ -0,0 +1 @@ +1 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-013/m.bin b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-013/m.bin new file mode 100644 index 000000000..95521ab08 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-013/m.bin differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-014/b.txt b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-014/b.txt new file mode 100644 index 000000000..c903f0229 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-014/b.txt @@ -0,0 +1,2 @@ +monitor file /nonexistent +link show diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-014/cmd.json b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-014/cmd.json new file mode 100644 index 000000000..628c56913 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-014/cmd.json @@ -0,0 +1,74 @@ +{ + "axes": { + "batch": "missing-then-show", + "fix": "file", + "mode": "file", + "words": "-force -batch b.txt" + }, + "cmd": "bridge -force -batch b.txt", + "desc": "negative: cmd=ng:file:batch:missing-then-show: Cannot fopen exits -1, which ends even a -force batch", + "env": { + "iproute2": "ip utility, iproute2-7.2.0, libbpf 1.8.0", + "kconfig": [ + "CONFIG_IPV6_IOAM6_LWTUNNEL=y", + "CONFIG_IPV6_RPL_LWTUNNEL=y", + "CONFIG_IPV6_SEG6_LWTUNNEL=y", + "CONFIG_LWTUNNEL=y", + "CONFIG_LWTUNNEL_BPF=y" + ], + "kernel": "7.3.1" + }, + "expect": { + "rc": 255, + "refused_by": "iproute2" + }, + "id": "brmonitor/ng-014", + "modules": [ + "bridge", + "vxlan" + ], + "pre": [ + "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "sleep 1.5", + "echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAA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AAAABAAoA7wEBAQAAAAAAAAAAAAAAAAgAAAAIAAEAAAAAAAUABQAEAAAABQADAAAAAAAkAAAAVAAAAAAAAAAAAAAABwAAAAMAAAAMAAIACAABAAUAAABUAAAAcAAAAAAAAAAAAAAABwAAAAQAAAA8AAGACAABAAAAFAAFAAMAAwAAAAUACQAAAAAABQAKAAAAAAAFAAYAAQAAAAgABwAAAAAACAAIAAAAAABcAAAAcAAAAAAAAAAAAAAABwAAAAUAAABEAAGACAABAAAAHgAGAAIAIAAAAAUAAwADAAAABQAJAAAAAAAFAAoAAAAAAAUABgABAAAACAAHAAAAAAAIAAgAAAAAACQAAABxAAAAAAAAAAAAAAAHAAAABAAAAAwAAYAIAAEAAAAUAKQAAABwAAAAAAAAAAAAAAAHAAAAAwAAAIwAAoAGAAEACgAAAAUAAwABAAAABQAEAAMAAAAIAAYAAgAAAAgABwACAAAABQAPAAAAAAAMAAgAZAAAAAAAAAAMAAoAkGUAAAAAAAAMAAsAnGMAAAAAAAAMAAwA1DAAAAAAAAAMAA0A6AMAAAAAAAAMAA4ANQwAAAAAAAAFAAUAAQAAAAYAEgAAAAAAJAAAAHgAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAJAAAAHkAAAAAAAAAAAAAAAcAAAAEAAAADAABgAgAAQD0AQAAGAAAAA8AAAAAAAAAAAAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin", + "printf '%s\\n' 'monitor file /nonexistent' 'link show' > b.txt" + ], + "proto": "route", + "result": { + "pre": [ + { + "cmd": "ip link add br0 address 02:00:00:00:01:00 type bridge vlan_filtering 1 && ip link set br0 addrgenmode none", + "rc": 0 + }, + { + "cmd": "ip link add d1 address 02:00:00:00:01:01 type dummy && ip link set d1 addrgenmode none && ip link set d1 master br0 && ip link set d1 up && ip link add d2 address 02:00:00:00:01:02 type dummy && ip link set d2 addrgenmode none && ip link set d2 master br0 && ip link set d2 up && ip link set br0 up", + "rc": 0 + }, + { + "cmd": "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "rc": 0 + }, + { + "cmd": "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + "rc": 0 + }, + { + "cmd": "sleep 1.5", + "rc": 0 + }, + { + "cmd": "echo sAEAABAAAAAAAAAAAAAAAAcAAQAGAAAAwwABAAAAAAAHAAMAZDMAAAgACgADAAAACAAEANwFAAAFABAAAAAAAAoAAQACAAAAAQMAAFgBDIAFAAEAAwAAAAYAAgAgAAAACAADAAkAAAAFAAQAAAAAAAUABQAAAAAABQAGAAAAAAAFAAcAAAAAAAUAHAAAAAAABQAIAAEAAAAFAAkAAQAAAAUAGwABAAAABQAeAAEAAAAFAAoAAAAAAAUADAAAAAAADAANAIAAAgAAAAEADAAOAIAAAgAAAAEABgAPAAOAAAAGABAAAAAAAAYAEQADgAAABgASAAMAAAAFABMAAAAAAAUAFAAAAAAABQAdAAAAAAAGAB8AAAAAAAUAIAAAAAAABQAjAAAAAAAFACQAAAAAAAUAIQAAAAAABQAnAAAAAAAFACgAAAAAAAUAKwAAAAAABQAtAAAAAAAMABUAAAAAAAAAAAAMABYA2wUAAAAAAAAMABcAAAAAAAAAAAAFABkAAQAAAAgAJQAAAgAACAAmAAAAAAAIACkAAAAAAAgAKgAAAAAADAAaAAgAAgAGAAEAzAUAABAAAAAAAAAAAAAAAAAAAQAHAAAAggAAAP////8IAAMAbWswAAgADQDoAwAABQAQAAIAAAAFABEAAAAAAAUAQwAAAAAACAAEANwFAAAIADIAAAAAAAgAMwAAAAAACAAbAAAAAAAIAB4AAAAAAAgAPQAAAAAACAAfAAEAAAAIACgA//8AAAgAKQAAAAEACAA6AAAAAQAIAD8AAAABAAgAQAAAAAEACAA7AAAAAQAIADwA//8AAAgAQgAAAAAACAAgAAEAAAAFACEAAQAAAAgAIwAAAAAACAAvAAAAAAAIADAAAAAAAAYARAAAAAAABgBFAAAAAAAFACcA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AAAAAAAAAAHAAAAHAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | base64 -d > m.bin", + "rc": 0 + }, + { + "cmd": "printf '%s\\n' 'monitor file /nonexistent' 'link show' > b.txt", + "rc": 0 + } + ], + "rc": 255, + "status": "OK" + } +} diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-014/ip.err b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-014/ip.err new file mode 100644 index 000000000..8523a69c2 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-014/ip.err @@ -0,0 +1 @@ +Cannot fopen: No such file or directory diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-014/ip.out b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-014/ip.out new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-014/ip.pcap b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-014/ip.pcap new file mode 100644 index 000000000..dcb4ca923 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-014/ip.pcap differ diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-014/ip.rc b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-014/ip.rc new file mode 100644 index 000000000..ace9d0362 --- /dev/null +++ b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-014/ip.rc @@ -0,0 +1 @@ +255 diff --git a/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-014/m.bin b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-014/m.bin new file mode 100644 index 000000000..95521ab08 Binary files /dev/null and b/pkg/xtcpnl/testdata/7_3_1/ws/brmonitor/ng-014/m.bin differ diff --git a/pkg/xtcpnl/xtcpnl_br_event.go b/pkg/xtcpnl/xtcpnl_br_event.go new file mode 100644 index 000000000..22bd31d40 --- /dev/null +++ b/pkg/xtcpnl/xtcpnl_br_event.go @@ -0,0 +1,76 @@ +package xtcpnl + +import "golang.org/x/sys/unix" + +// This file names the bridge object a `bridge monitor` event is about, as +// accept_msg (iproute2 bridge/monitor.c) dispatches it to print_linkinfo, +// print_fdb, print_mdb_mon, print_vlan_rtm, print_vnifilter_rtm or +// print_nlmsg_timestamp. + +// BrObj is the bridge object an rtnetlink message is about. +type BrObj uint8 + +const ( + // BrObjNone is not a bridge event: accept_msg's default, which drops it + // silently. + BrObjNone BrObj = iota + BrObjLink + BrObjNeigh + BrObjMdb + BrObjVlan + BrObjTunnel + // BrObjTstamp is NLMSG_TSTAMP, the record rtmon writes ahead of each + // batch; accept_msg prints it. + BrObjTstamp +) + +var brObjNames = [...]string{"not bridge", "link", "neigh", "mdb", "vlan", "tunnel", "tstamp"} + +func (o BrObj) String() string { + if int(o) < len(brObjNames) { + return brObjNames[o] + } + return "BrObj(?)" +} + +// nlmsgTstampCst is NLMSG_TSTAMP (iproute2 include/libnetlink.h), not a +// kernel type: rtmon writes it into its files. +const nlmsgTstampCst = 15 + +// BrEventKind is the bridge object of a monitor event of type typ, and +// whether the event is a delete. It follows accept_msg: only the NEW and +// DEL types are events there, so every GET and SET type (RTM_GETLINK, +// RTM_SETLINK, RTM_GETNEIGH, RTM_GETMDB, RTM_GETVLAN, RTM_GETTUNNEL) is +// none, as is every family accept_msg has no arm for. +// +// Values (linux/include/uapi/linux/rtnetlink.h): RTM_NEWLINK 16, +// RTM_DELLINK 17, RTM_NEWNEIGH 28, RTM_DELNEIGH 29, RTM_NEWMDB 84, +// RTM_DELMDB 85, RTM_NEWVLAN 112, RTM_DELVLAN 113, RTM_NEWTUNNEL 120, +// RTM_DELTUNNEL 121; NLMSG_TSTAMP 15. +func BrEventKind(typ uint16) (BrObj, bool) { + switch typ { + case unix.RTM_NEWLINK: + return BrObjLink, false + case unix.RTM_DELLINK: + return BrObjLink, true + case unix.RTM_NEWNEIGH: + return BrObjNeigh, false + case unix.RTM_DELNEIGH: + return BrObjNeigh, true + case unix.RTM_NEWMDB: + return BrObjMdb, false + case unix.RTM_DELMDB: + return BrObjMdb, true + case unix.RTM_NEWVLAN: + return BrObjVlan, false + case unix.RTM_DELVLAN: + return BrObjVlan, true + case unix.RTM_NEWTUNNEL: + return BrObjTunnel, false + case unix.RTM_DELTUNNEL: + return BrObjTunnel, true + case nlmsgTstampCst: + return BrObjTstamp, false + } + return BrObjNone, false +} diff --git a/pkg/xtcpnl/xtcpnl_br_event_test.go b/pkg/xtcpnl/xtcpnl_br_event_test.go new file mode 100644 index 000000000..3ce02e691 --- /dev/null +++ b/pkg/xtcpnl/xtcpnl_br_event_test.go @@ -0,0 +1,65 @@ +package xtcpnl + +import ( + "testing" + + "golang.org/x/sys/unix" +) + +// TestBrEventKind pins accept_msg's dispatch (iproute2 bridge/monitor.c): +// the NEW and DEL types of link, neigh, mdb, vlan and tunnel, and +// NLMSG_TSTAMP; every GET and SET type and every other family is none. +// +// go test ./pkg/xtcpnl/ -run TestBrEventKind +func TestBrEventKind(t *testing.T) { + tests := []struct { + description string + typ uint16 + expected string // object ("not bridge" for none), then "del" for a delete + }{ + {"positive: RTM_NEWLINK", unix.RTM_NEWLINK, "link"}, + {"positive: RTM_NEWNEIGH", unix.RTM_NEWNEIGH, "neigh"}, + {"positive: RTM_NEWMDB", unix.RTM_NEWMDB, "mdb"}, + {"positive: RTM_NEWVLAN", unix.RTM_NEWVLAN, "vlan"}, + {"positive: RTM_NEWTUNNEL", unix.RTM_NEWTUNNEL, "tunnel"}, + {"positive: RTM_DELLINK", unix.RTM_DELLINK, "link del"}, + {"positive: RTM_DELNEIGH", unix.RTM_DELNEIGH, "neigh del"}, + {"positive: RTM_DELMDB", unix.RTM_DELMDB, "mdb del"}, + {"positive: RTM_DELVLAN", unix.RTM_DELVLAN, "vlan del"}, + {"positive: RTM_DELTUNNEL", unix.RTM_DELTUNNEL, "tunnel del"}, + {"negative: RTM_NEWROUTE", unix.RTM_NEWROUTE, "not bridge"}, + {"negative: RTM_NEWADDR", unix.RTM_NEWADDR, "not bridge"}, + {"negative: RTM_NEWQDISC", unix.RTM_NEWQDISC, "not bridge"}, + {"negative: NLMSG_DONE", unix.NLMSG_DONE, "not bridge"}, + {"negative: NLMSG_ERROR", unix.NLMSG_ERROR, "not bridge"}, + {"boundary: RTM_GETLINK (NEWLINK + 2)", unix.RTM_GETLINK, "not bridge"}, + {"boundary: RTM_SETLINK (NEWLINK + 3)", unix.RTM_SETLINK, "not bridge"}, + {"boundary: 14, under NLMSG_TSTAMP", unix.RTM_NEWLINK - 2, "not bridge"}, + {"boundary: RTM_NEWLINK - 1 is NLMSG_TSTAMP (15)", unix.RTM_NEWLINK - 1, "tstamp"}, + {"boundary: RTM_GETNEIGH (NEWNEIGH + 2)", unix.RTM_GETNEIGH, "not bridge"}, + {"boundary: RTM_NEWMDB - 1", unix.RTM_NEWMDB - 1, "not bridge"}, + {"boundary: RTM_GETMDB (NEWMDB + 2)", unix.RTM_GETMDB, "not bridge"}, + {"boundary: RTM_NEWVLAN - 1", unix.RTM_NEWVLAN - 1, "not bridge"}, + {"boundary: RTM_GETVLAN (NEWVLAN + 2)", unix.RTM_GETVLAN, "not bridge"}, + {"boundary: RTM_NEWTUNNEL - 1", unix.RTM_NEWTUNNEL - 1, "not bridge"}, + {"boundary: RTM_GETTUNNEL (NEWTUNNEL + 2)", unix.RTM_GETTUNNEL, "not bridge"}, + {"boundary: the largest type", 0xffff, "not bridge"}, + {"corner: NLMSG_TSTAMP (15) is its own kind, not none", 15, "tstamp"}, + {"corner: type 0", 0, "not bridge"}, + } + for _, tc := range tests { + t.Run(tc.description, func(t *testing.T) { + obj, del := BrEventKind(tc.typ) + got := obj.String() + if del { + got += " del" + } + if got != tc.expected { + t.Errorf("BrEventKind(%d) = %q, want %q", tc.typ, got, tc.expected) + } + }) + } + if s := BrObj(200).String(); s != "BrObj(?)" { + t.Errorf("BrObj(200).String() = %q", s) + } +} diff --git a/pkg/xtcpnl/xtcpnl_ws_brmonitor_test.go b/pkg/xtcpnl/xtcpnl_ws_brmonitor_test.go new file mode 100644 index 000000000..3e7c7a4e5 --- /dev/null +++ b/pkg/xtcpnl/xtcpnl_ws_brmonitor_test.go @@ -0,0 +1,383 @@ +package xtcpnl + +import ( + "bytes" + "errors" + "fmt" + "os" + "path/filepath" + "strings" + "testing" + + "golang.org/x/sys/unix" +) + +// brEvent is one bridge monitor event: a header and its body. +type brEvent struct { + h NlMsgHdr + body []byte +} + +// brMonEvents picks the kernel's bridge-object messages out of a capture: +// a type accept_msg prints (BrEventKind), sent by the kernel (no +// NLM_F_REQUEST) and not part of a dump (no NLM_F_MULTI). A lookup's +// RTM_NEWLINK answer is among them; it decodes as any link does. +func brMonEvents(msgs []capturedNlMsg) []brEvent { + var out []brEvent + for _, m := range msgs { + obj, _ := BrEventKind(m.h.Type) + if m.proto != unix.NETLINK_ROUTE || obj == BrObjNone || obj == BrObjTstamp || + m.h.Flags&(unix.NLM_F_REQUEST|unix.NLM_F_MULTI) != 0 { + continue + } + out = append(out, brEvent{m.h, m.body}) + } + return out +} + +// brMonFileRecs walks an rtnl_from_file record file. +func brMonFileRecs(t testing.TB, path string) []brEvent { + t.Helper() + b, err := os.ReadFile(path) + if err != nil { + t.Fatal(err) + } + var out []brEvent + for len(b) >= NlMsgHdrSizeCst { + var h NlMsgHdr + if _, err := DeserializeNlMsgHdr(b, &h); err != nil { + t.Fatal(err) + } + l := int(h.Len) + if l < NlMsgHdrSizeCst || l > len(b) { + t.Fatalf("%s: record of %d bytes in %d", path, l, len(b)) + } + out = append(out, brEvent{h, b[NlMsgHdrSizeCst:l]}) + b = b[min((l+3)&^3, len(b)):] + } + return out +} + +// brEventDecode decodes an event with the parser bridge's printer leans on: +// ParseBridgeLink for an AF_BRIDGE link and ParseNewLink for any other, +// ParseNeigh, ParseMdbDumpRouters, ParseBrVlan and ParseTunnelMsg. A +// TSTAMP is two u32s. +func brEventDecode(typ uint16, body []byte) error { + obj, _ := BrEventKind(typ) + var err error + switch obj { + case BrObjNone: + case BrObjLink: + if len(body) > 0 && body[0] == unix.AF_BRIDGE { + _, err = ParseBridgeLink(body) + } else { + _, err = ParseNewLink(body) + } + case BrObjNeigh: + _, err = ParseNeigh(body) + case BrObjMdb: + _, err = ParseMdbDumpRouters(body) + case BrObjVlan: + _, err = ParseBrVlan(body) + case BrObjTunnel: + _, err = ParseTunnelMsg(body) + case BrObjTstamp: + if len(body) != 8 { + err = fmt.Errorf("TSTAMP body of %d bytes, want 8", len(body)) + } + } + return err +} + +// TestWsBrMonitor decodes every event in the brmonitor captures (gobridge +// 25P), live and in the record files, and pins what they show of the +// kernel: K11, K12, K13, K14, K15, K16, K17 and B76's missing STATE. +// +// go test ./pkg/xtcpnl/ -run TestWsBrMonitor +func TestWsBrMonitor(t *testing.T) { + dir := filepath.Join("testdata", "7_3_1", "ws", "brmonitor") + rows, err := filepath.Glob(filepath.Join(dir, "*", "cmd.json")) + if err != nil { + t.Fatal(err) + } + if len(rows) != 44 { + t.Fatalf("%d brmonitor rows, want 44", len(rows)) + } + seen := map[string]int{} + events := map[string][]brEvent{} + files := map[string][]brEvent{} + for _, cj := range rows { + rd := filepath.Dir(cj) + id := filepath.Base(rd) + evs := brMonEvents(pcapNlMsgs(t, filepath.Join(rd, "ip.pcap"))) + if _, err := os.Stat(filepath.Join(rd, "m.bin")); err == nil && strings.HasPrefix(id, "ec") { + files[id] = brMonFileRecs(t, filepath.Join(rd, "m.bin")) + evs = append(evs, files[id]...) + } + events[id] = evs + for i, e := range evs { + obj, del := BrEventKind(e.h.Type) + if obj == BrObjNone { + continue + } + if err := brEventDecode(e.h.Type, e.body); err != nil { + t.Errorf("%s event %d (type %d): %v", id, i, e.h.Type, err) + } + seen[fmt.Sprintf("%s del=%t", obj, del)]++ + } + } + + evOf := func(id string, typ uint16) []brEvent { + var out []brEvent + for _, e := range events[id] { + if e.h.Type == typ { + out = append(out, e) + } + } + return out + } + tests := []struct { + description string + check func() error + expected string // "" for no problem + }{ + {"positive: NEW and DEL of all five objects decode", func() error { + var errs []error + for _, o := range []BrObj{BrObjLink, BrObjNeigh, BrObjMdb, BrObjVlan, BrObjTunnel} { + for _, del := range []bool{false, true} { + if seen[fmt.Sprintf("%s del=%t", o, del)] == 0 { + errs = append(errs, fmt.Errorf("no %s event with del=%t", o, del)) + } + } + } + return errors.Join(errs...) + }, ""}, + {"positive: K12, a vlan range add is one RTM_NEWVLAN with vid 30 and range 32 (ec-005)", func() error { + for _, e := range evOf("ec-005", unix.RTM_NEWVLAN) { + v, err := ParseBrVlan(e.body) + if err != nil { + return err + } + for _, en := range v.Entries { + if en.HasRange { + if en.Vid != 30 || en.Range != 32 { + return fmt.Errorf("range %d-%d, want 30-32", en.Vid, en.Range) + } + return nil + } + } + } + return errors.New("no range entry") + }, ""}, + {"positive: K13, a vni range add is one RTM_NEWTUNNEL per VNI, 600 to 602 (ec-006)", func() error { + var vnis []uint32 + for _, e := range evOf("ec-006", unix.RTM_NEWTUNNEL) { + tm, err := ParseTunnelMsg(e.body) + if err != nil { + return err + } + for _, en := range tm.Entries { + st, _ := en.Attrs.U32(VxlanVnifilterEntryStart) + if st >= 600 && st <= 602 { + if en.Attrs.Has(VxlanVnifilterEntryEnd) { + return fmt.Errorf("vni %d event has an END", st) + } + vnis = append(vnis, st) + } + } + } + if fmt.Sprint(vnis) != "[600 601 602]" { + return fmt.Errorf("vnis %v, want [600 601 602]", vnis) + } + return nil + }, ""}, + {"positive: K17, a vlan add notifies the port's local fdb entry before its RTM_NEWLINK (ec-008)", func() error { + for i, e := range events["ec-008"] { + if e.h.Type != unix.RTM_NEWNEIGH { + continue + } + n, err := ParseNeigh(e.body) + if err != nil { + return err + } + if n.Vlan != 20 || !bytes.Equal(n.LLAddr, []byte{2, 0, 0, 0, 1, 1}) { + continue + } + for _, l := range events["ec-008"][i+1:] { + if l.h.Type == unix.RTM_NEWLINK && l.body[0] == unix.AF_BRIDGE { + return nil + } + } + return errors.New("no RTM_NEWLINK AF_BRIDGE after the fdb entry") + } + return errors.New("no fdb event for 02:00:00:00:01:01 vlan 20") + }, ""}, + {"positive: K15, the AF_INET neighbor arrives and decodes (ec-002)", func() error { + for _, e := range evOf("ec-002", unix.RTM_NEWNEIGH) { + n, err := ParseNeigh(e.body) + if err != nil { + return err + } + if n.Family == unix.AF_INET { + return nil + } + } + return errors.New("no AF_INET neighbor event") + }, ""}, + {"negative: K16, an fdb replace sends no RTM_DELNEIGH for the old port (ec-002)", func() error { + var dels []int32 + for _, e := range evOf("ec-002", unix.RTM_DELNEIGH) { + n, err := ParseNeigh(e.body) + if err != nil { + return err + } + dels = append(dels, n.Ifindex) + } + if fmt.Sprint(dels) != "[5]" { + return fmt.Errorf("deletes on %v, want only the explicit one on d2 (5)", dels) + } + return nil + }, ""}, + {"negative: K14, the router notification's port has no timer and no type (ec-004)", func() error { + for _, e := range evOf("ec-004", unix.RTM_NEWMDB) { + d, err := ParseMdbDumpRouters(e.body) + if err != nil { + return err + } + if !d.HasRouter { + continue + } + if len(d.Routers) != 1 || d.Routers[0].Ifindex != 5 || d.Routers[0].HasTimer || d.Routers[0].HasType { + return fmt.Errorf("routers %+v, want d2 (5) alone", d.Routers) + } + return nil + } + return errors.New("no router notification") + }, ""}, + {"negative: B76, the RTM_DELVLAN entry carries no STATE (ec-005)", func() error { + d := evOf("ec-005", unix.RTM_DELVLAN) + if len(d) != 1 { + return fmt.Errorf("%d RTM_DELVLAN, want 1", len(d)) + } + v, err := ParseBrVlan(d[0].body) + if err != nil { + return err + } + if len(v.Entries) != 1 || !v.Entries[0].HasInfo || v.Entries[0].HasState || v.Entries[0].Vid != 20 { + return fmt.Errorf("entries %+v, want vid 20 with no STATE", v.Entries) + } + return nil + }, ""}, + {"boundary: the empty and one-record files (ec-026, ec-025)", func() error { + if n, m := len(files["ec-026"]), len(files["ec-025"]); n != 0 || m != 1 { + return fmt.Errorf("%d and %d records, want 0 and 1", n, m) + } + return nil + }, ""}, + {"corner: K11, a port add is two AF_UNSPEC then three AF_BRIDGE RTM_NEWLINKs for d3, the last two equal (ec-001)", func() error { + var fams []byte + var bridge [][]byte + for _, e := range evOf("ec-001", unix.RTM_NEWLINK) { + if len(e.body) < 8 || e.body[4] != 6 || len(e.body) < 100 { + continue // not d3, or a lookup's short answer + } + fams = append(fams, e.body[0]) + if e.body[0] == unix.AF_BRIDGE { + bridge = append(bridge, e.body) + } + if len(fams) == 5 { + break + } + } + if !bytes.Equal(fams, []byte{0, 0, 7, 7, 7}) { + return fmt.Errorf("families %v, want [0 0 7 7 7]", fams) + } + if !bytes.Equal(bridge[1], bridge[2]) || bytes.Equal(bridge[0], bridge[1]) { + return errors.New("want the second and third AF_BRIDGE equal and the first different") + } + return nil + }, ""}, + {"corner: the event file is 19 records, every NEW and DEL type, a TSTAMP and an RTM_NEWROUTE (ec-019)", func() error { + recs := files["ec-019"] + types := map[uint16]bool{} + for _, r := range recs { + types[r.h.Type] = true + } + if len(recs) != 19 || !types[nlmsgTstampCst] || !types[unix.RTM_NEWROUTE] || !types[unix.RTM_DELTUNNEL] || !types[unix.RTM_DELMDB] { + return fmt.Errorf("%d records, types %v", len(recs), types) + } + return nil + }, ""}, + } + for _, tc := range tests { + t.Run(tc.description, func(t *testing.T) { + err := tc.check() + got := "" + if err != nil { + got = err.Error() + } + if got != tc.expected { + t.Errorf("got %q, want %q", got, tc.expected) + } + }) + } + t.Logf("events %v", seen) +} + +// BenchmarkWsBrMonitor decodes every bridge event of the brmonitor corpus +// per iteration, the ec rows' record files included. +// +// go test ./pkg/xtcpnl/ -run '^$' -bench WsBrMonitor -benchmem +func BenchmarkWsBrMonitor(b *testing.B) { + dirs, err := filepath.Glob(filepath.Join("testdata", "7_3_1", "ws", "brmonitor", "*")) + if err != nil { + b.Fatal(err) + } + all := make([]brEvent, 0, 512) + for _, d := range dirs { + all = append(all, brMonEvents(pcapNlMsgs(b, filepath.Join(d, "ip.pcap")))...) + // The ng rows' files are the truncated and malformed ones. + if _, err := os.Stat(filepath.Join(d, "m.bin")); err == nil && strings.HasPrefix(filepath.Base(d), "ec") { + all = append(all, brMonFileRecs(b, filepath.Join(d, "m.bin"))...) + } + } + evs := make([]brEvent, 0, len(all)) + for _, e := range all { + if o, _ := BrEventKind(e.h.Type); o != BrObjNone { + evs = append(evs, e) + } + } + if len(evs) == 0 { + b.Fatal("no events") + } + var n int + for _, e := range evs { + n += len(e.body) + } + b.ReportAllocs() + b.SetBytes(int64(n)) + for b.Loop() { + for _, e := range evs { + if err := brEventDecode(e.h.Type, e.body); err != nil { + b.Fatal(err) + } + } + } + b.ReportMetric(float64(b.Elapsed().Nanoseconds())/float64(b.N)/float64(len(evs)), "ns/msg") +} + +// BenchmarkBrEventKind is the dispatch alone. +func BenchmarkBrEventKind(b *testing.B) { + types := []uint16{unix.RTM_NEWLINK, unix.RTM_DELNEIGH, unix.RTM_NEWMDB, unix.RTM_GETVLAN, unix.RTM_NEWROUTE, nlmsgTstampCst} + var n int + for b.Loop() { + for _, typ := range types { + if o, _ := BrEventKind(typ); o != BrObjNone { + n++ + } + } + } + if n == 0 { + b.Fatal("no events") + } +} diff --git a/tools/nlcapgen/main.go b/tools/nlcapgen/main.go index 694e6ad9c..93df23f96 100644 --- a/tools/nlcapgen/main.go +++ b/tools/nlcapgen/main.go @@ -163,6 +163,7 @@ var families = map[string]func() []*space{ "tcaction": func() []*space { return []*space{tcactionSpace()} }, "tcaction2": func() []*space { return []*space{tcaction2Space()} }, "tcmonitor": func() []*space { return []*space{tcmonitorSpace()} }, + "brmonitor": func() []*space { return []*space{brmonitorSpace()} }, "tcsched": func() []*space { return []*space{tcschedSpace()} }, "tcaqm": func() []*space { return []*space{tcaqmSpace()} }, "tcqwrite": func() []*space { return []*space{tcqwriteSpace()} }, @@ -187,7 +188,7 @@ var namedFamilies = map[string]func() []row{ func runMatrix(args []string, stdout, stderr io.Writer) int { fs := flag.NewFlagSet("matrix", flag.ContinueOnError) fs.SetOutput(stderr) - family := fs.String("family", "", "the family to generate: ev, route, rule, nexthop, addr, neigh, link, linkattr, routeget, fdb, mdb, ss, mpls, ethtool, devlink, vdpa, fou, mptcp, tipc, bridge, bridgex, bridgefdb, bridgemdb, tunnel, tuntap, tcqdisc, tcclass, tcfilter, tcflower, tcaction, tcaction2, tcmonitor, tcsched, tcaqm, kwlive, lwt, lwtx, lwtenc, nhstats, v730, v730ip720, stats") + family := fs.String("family", "", "the family to generate: ev, route, rule, nexthop, addr, neigh, link, linkattr, routeget, fdb, mdb, ss, mpls, ethtool, devlink, vdpa, fou, mptcp, tipc, bridge, bridgex, bridgefdb, bridgemdb, brmonitor, tunnel, tuntap, tcqdisc, tcclass, tcfilter, tcflower, tcaction, tcaction2, tcmonitor, tcsched, tcaqm, kwlive, lwt, lwtx, lwtenc, nhstats, v730, v730ip720, stats") seed := fs.Uint64("seed", 1, "the random rows' seed, recorded in their ids") random := fs.Int("random", 0, "random rows per space") out := fs.String("out", "", "rows file to write") @@ -199,7 +200,7 @@ func runMatrix(args []string, stdout, stderr io.Writer) int { ok = true } if !ok || *out == "" || *random < 0 { - fmt.Fprintln(stderr, "nlcapgen matrix: -family (ev, route, rule, nexthop, addr, neigh, link, linkattr, routeget, fdb, mdb, ss, mpls, ethtool, devlink, vdpa, fou, mptcp, tipc, bridge, bridgex, bridgefdb, bridgemdb, tunnel, tuntap, tcqdisc, tcclass, tcfilter, tcflower, tcaction, tcaction2, tcmonitor, tcsched, tcaqm, kwlive, lwt, lwtx, lwtenc, nhstats, v730, v730ip720, stats) and -out are required, -random must be >= 0") + fmt.Fprintln(stderr, "nlcapgen matrix: -family (ev, route, rule, nexthop, addr, neigh, link, linkattr, routeget, fdb, mdb, ss, mpls, ethtool, devlink, vdpa, fou, mptcp, tipc, bridge, bridgex, bridgefdb, bridgemdb, brmonitor, tunnel, tuntap, tcqdisc, tcclass, tcfilter, tcflower, tcaction, tcaction2, tcmonitor, tcsched, tcaqm, kwlive, lwt, lwtx, lwtenc, nhstats, v730, v730ip720, stats) and -out are required, -random must be >= 0") return 2 } var rows []row diff --git a/tools/nlcapgen/matrix_brmonitor.go b/tools/nlcapgen/matrix_brmonitor.go new file mode 100644 index 000000000..0bd3d7c2b --- /dev/null +++ b/tools/nlcapgen/matrix_brmonitor.go @@ -0,0 +1,327 @@ +package main + +import ( + "encoding/binary" + "strings" + + "golang.org/x/sys/unix" +) + +// The bridge monitor space (gobridge 25C): `bridge monitor` live, under the +// xtcp2-nl-brmon-ws helper (nix/microvms/netlink-capture.nix), which starts +// it in the background, waits until its socket is the one listening, runs a +// trigger and stops it with SIGTERM once its output matches; `bridge monitor +// file` over records nlcapgen writes; the argument refusals; and batches +// that carry monitor's statics into the lines after it. One corpus +// directory, ws/brmonitor, outside gobridge's ws/bridge* glob. +// +// bridge's side is bridge/monitor.c (accept_msg, do_monitor), +// lib/libnetlink.c (rtnl_listen, rtnl_from_file), lib/utils.c +// (print_timestamp, print_nlmsg_timestamp), and the printers print_linkinfo, +// print_fdb, print_mdb_mon, print_vlan_rtm and print_vnifilter_rtm, each of +// which calls print_headers after its own filters. The kernel's side is +// br_ifinfo_notify, fdb_notify, br_mdb_notify and br_rtr_notify, +// br_vlan_notify and vxlan_vnifilter_notify. +// +// The rows pin the plan's leads (docs/netlink/upstream/iproute2-bridge-monitor.md): +// a bare monitor joins neither BRVLAN nor TUNNEL (B58), the prefix dispatch +// (B59), word order (B60), -j ignored (B61), the batch statics (B62-B64, +// B69), file mode's selectors and names (B65, B66), AF_UNSPEC links +// printed (B67), the vlan monitor's port block (B70), the usage (B72), an +// unknown type dropped (B73) and file mode's stamps (B75); and the kernel +// notes K10-K16. +// +// Determinism: fixed MACs, addrgenmode none, STP off, IPv6 off on the mdb +// bridge; each fixture ends with a settle, so the link watcher's delayed +// events from the setup are sent before the monitor starts. Each trigger +// does its work, settles again, then makes one marker event the row's ERE +// waits for, so every event the work raised is in before SIGTERM. The -t +// stamps are the wall clock, masked by the corpus tests. Writes happen only +// in triggers and pre steps. + +// brmSettle lets the link watcher send what the steps before it queued: it +// batches non-urgent events up to a second. +const brmSettle = "sleep 1.5" + +// brmFix is br0, VLAN filtering on, with d1 and d2 on vid 10, and d3, a +// dummy that is up but no port yet. +var brmFix = []string{ + brCreate(false), brPorts("d1", "d2"), + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10", + "ip link add d3 address 02:00:00:00:01:03 type dummy && ip link set d3 addrgenmode none && ip link set d3 up", + brmSettle, +} + +// brmVlanFix is brmFix with per-VLAN multicast snooping, for vlan global. +var brmVlanFix = append(clonePre(brmFix[:len(brmFix)-1]), + "ip link set br0 type bridge mcast_vlan_snooping 1", brmSettle) + +// brmMdbFix is br0 snooping IGMPv3 and MLDv2 with IPv6 off (its own MLD +// report would add a host join at a random moment), d1 and d2 on vid 10. +var brmMdbFix = []string{ + brCreate(false) + " && ip link set br0 type bridge mcast_igmp_version 3 mcast_mld_version 2" + + " && echo 1 > /proc/sys/net/ipv6/conf/br0/disable_ipv6", + brPorts("d1", "d2"), + "bridge vlan add dev d1 vid 10 && bridge vlan add dev d2 vid 10 && bridge vlan add dev br0 vid 10 self", + brmSettle, +} + +// brmVxFix is vx0, a VXLAN with VNI 100 over d5, for remote fdb entries. +var brmVxFix = append(clonePre(fdbVxFix[:2]), brmSettle) + +// brmVniFix is vx1, an external VNI-filtering VXLAN over d9, holding VNI 100. +var brmVniFix = append(clonePre(vnifFix[:2]), "bridge vni add dev vx1 vni 100", brmSettle) + +// Bodies of the kernel's own notifications, from batch 1 of this space's +// live rows (7.3.1), for the file records. Each header's ifindex is the +// fixture's (br0 3, d1 4, d2 5, d3 6, mk0 7) unless a record sets another. +const ( + // ec-001: d3 as a port, cost 9 (RTM_NEWLINK AF_BRIDGE), its delete + // (RTM_DELLINK AF_BRIDGE), and mk0's add (RTM_NEWLINK AF_UNSPEC). + brmLinkHex = "0700010006000000c300010000000000070003006433000008000a000300000008000400dc05000005001000000000000a000100020000000103000058010c80050001000300000006000200200000000800030009000000050004000000000005000500000000000500060000000000050007000000000005001c00000000000500080001000000050009000100000005001b000100000005001e000100000005000a000000000005000c00000000000c000d0080000200000001000c000e00800002000000010006000f00038000000600100000000000060011000380000006001200030000000500130000000000050014000000000005001d000000000006001f000000000005002000000000000500230000000000050024000000000005002100000000000500270000000000050028000000000005002b000000000005002d00000000000c00150000000000000000000c001600db050000000000000c0017000000000000000000050019000100000008002500000200000800260000000000080029000000000008002a00000000000c001a000800020006000100" + brmDelLinkHex = "0700010006000000c300010000000000070003006433000008000a000300000008000400dc05000005001000000000000a00010002000000010300000c001a000800020006000100" + brmUnspecHex = "000001000700000082000000ffffffff080003006d6b300008000d00e803000005001000020000000500110000000000050043000000000008000400dc0500000800320000000000080033000000000008001b000000000008001e000000000008003d000000000008001f000100000008002800ffff0000080029000000010008003a000000010008003f0000000100080040000000010008003b000000010008003c00ffff0000080042000000000008002000010000000500210001000000080023000000000008002f000000000008003000000000000600440000000000060045000000000005002700000000000a00010002000000010f00000a000200ffffffffffff0000cc0017000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000640007000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c002b000500020000000000100012000a00010064756d6d79000000090006006e6f6f700000000030031a008c00020088000100000000000000000000000000010000000100000001000000010000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000010270000e80300000000000000000000000000000000000001000000a0020a00080001000000000014000500ffff000027080000d1590000e8030000f40002000000000040000000dc05000001000000010000000100000001000000ffffffffa00f0000e80300000000000000a30200805101000300000058020000100000000000000001000000010000000100000060ea0000000000000000000000000000000000000000000000000000ffffffff000000000000000010270000e8030000010000000000000000000000010000000000000000000000010000000000000000000000000000000000000080ee360000000000000000000100000000000000000000000000000000000000000000000004000000000000ffff0000ffffffff0100000000000000000000000000000034010300260000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003c00060007000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001400070000000000000000000000000000000000050008000000000024000e00000000000000000000000000000000000000000000000000000000000000000004003e8004004180" + // ec-002: 02:00:00:00:0a:01 on d1 vlan 10, and its delete on d2; the + // AF_INET neighbor 192.0.2.5 on br0 (K15). ec-003: vx0's remote with + // dst 192.0.2.2 port 4790 vni 200. + brmFdbHex = "0700000004000000400000000a000200020000000a010000080009000300000008000f00000000001400030000000000000000000000000000000000060005000a000000" + brmDelFdbHex = "0700000005000000400000000a000200020000000a010000080009000300000008000f00000000001400030000000000000000000000000000000000060005000a000000" + brmInetHex = "02000000030000008000000108000100c00002050a000200020000000a05000008000400000000001400030000000000000000000000000001000000" + brmFdbVxHex = "0700000004000000c00002010a000200000000000000000008000100c00002020600060012b6000008000700c80000001400030000000000000000000000000000000000" + // ec-004: 239.1.1.1 on d1 vid 10, 01:02:03:04:05:06 on d2, the + // 239.1.1.1 delete, and d2 made a router port. + brmMdbHex = "0700000003000000400001003c000100380001000400000001000a00ef01010100000000000000000000000008000000080001000000000005000500040000000500030000000000" + brmMdbL2Hex = "07000000030000003800010034000100300001000500000001000a00010203040506000000000000000000000000000008000100000000000500050004000000" + brmMdbRtrHex = "07000000030000000c0002000800010005000000" + // ec-005: vid 20 on d1, 30-32 on d2 (K12), vid 20's delete, and br0's + // vid 10 global options. + brmVlanHex = "07000000040000003c00018008000100000014000500030003000000050009000000000005000a0000000000050006000100000008000700000000000800080000000000" + brmVlanRangeHex = "0700000005000000440001800800010000001e0006000200200000000500030003000000050009000000000005000a0000000000050006000100000008000700000000000800080000000000" + brmDelVlanHex = "07000000040000000c0001800800010000001400" + brmVlanGlobalHex = "07000000030000008c000280060001000a000000050003000100000005000400030000000800060002000000080007000200000005000f00000000000c00080064000000000000000c000a0090650000000000000c000b009c630000000000000c000c00d4300000000000000c000d00e8030000000000000c000e00350c00000000000005000500010000000600120000000000" + // ec-006: vni 500 added and deleted. + brmVniHex = "07000000040000000c00018008000100f4010000" +) + +// brmEvents is a file of the kernel's notifications, one of each NEW and +// DEL type: a port's add and delete and mk0's AF_UNSPEC add (B67); an fdb +// entry, its delete, a vxlan remote whose ifindex is d1 here (B66) and an +// AF_INET neighbor (K15); two mdb entries, a delete and a router port; +// two vlan entries, a delete and br0's global options; vni 500 added and +// deleted, vx1's ifindex, which is d1 here (B66); then a TSTAMP and an +// RTM_NEWROUTE, which accept_msg prints and drops (B73). +func brmEvents() []byte { + recs := []struct { + typ uint16 + hex string + index uint32 + }{ + {unix.RTM_NEWLINK, brmLinkHex, 0}, + {unix.RTM_NEWLINK, brmUnspecHex, 0}, + {unix.RTM_DELLINK, brmDelLinkHex, 0}, + {unix.RTM_NEWNEIGH, brmFdbHex, 0}, + {unix.RTM_DELNEIGH, brmDelFdbHex, 0}, + {unix.RTM_NEWNEIGH, brmFdbVxHex, 0}, + {unix.RTM_NEWNEIGH, brmInetHex, 0}, + {unix.RTM_NEWMDB, brmMdbHex, 0}, + {unix.RTM_NEWMDB, brmMdbL2Hex, 0}, + {unix.RTM_DELMDB, brmMdbHex, 0}, + {unix.RTM_NEWMDB, brmMdbRtrHex, 0}, + {unix.RTM_NEWVLAN, brmVlanHex, 0}, + {unix.RTM_NEWVLAN, brmVlanRangeHex, 0}, + {unix.RTM_DELVLAN, brmDelVlanHex, 0}, + {unix.RTM_NEWVLAN, brmVlanGlobalHex, 0}, + {unix.RTM_NEWTUNNEL, brmVniHex, 0}, + {unix.RTM_DELTUNNEL, brmVniHex, 0}, + } + b := make([]byte, 0, 4096) + for _, r := range recs { + b = append(b, monRec(r.typ, 0, monBody(r.hex, r.index), 0)...) + } + b = append(b, monRec(brmTstampCst, 0, binary.LittleEndian.AppendUint32(binary.LittleEndian.AppendUint32(nil, 0), 7), 0)...) + b = append(b, monRec(unix.RTM_NEWROUTE, 0, make([]byte, 12), 0)...) + return b +} + +// brmTstampCst is NLMSG_TSTAMP (iproute2 include/libnetlink.h). +const brmTstampCst = 15 + +// brmOne is a file of one record: the fdb entry. +func brmOne() []byte { return monRec(unix.RTM_NEWNEIGH, 0, monBody(brmFdbHex, 0), 0) } + +// brmMissingIndex is ifindex 9, which brmFix lacks. +const brmMissingIndex = 9 + +// The markers: one event of the monitored kind, made last, that the row's +// ERE waits for. +const ( + brmMarkLink = "ip link add mk0 address 02:00:00:00:01:0f type dummy" + brmMarkFdb = "bridge fdb add 02:00:00:00:0f:ff dev d1 master static vlan 10" + brmMarkVx = "bridge fdb add 02:00:00:00:0f:ff dev vx0 dst 192.0.2.9" + brmMarkMdb = "bridge mdb add dev br0 port d1 grp 239.9.9.9 permanent vid 10" + brmMarkVlan = "bridge vlan add dev d2 vid 3999" + brmMarkVni = "bridge vni add dev vx1 vni 999999" + brmSeeLink = "mk0" + brmSeeFdb = "0f:ff" + brmSeeMdb = `239\.9\.9\.9` + brmSeeVlan = "3999" + brmSeeVni = "999999" +) + +// brmTrig is a trigger: the work, a settle, then the marker. +func brmTrig(work, mark string) string { return work + " && " + brmSettle + " && " + mark } + +// brmLive is a live row: bridge's args, the fixture, the trigger and the +// ERE the monitor's output must match before SIGTERM. +func brmLive(kind brKind, name, args string, pre []string, trigger, until string) value { + return monLive(kind, name, args, pre, trigger, until) +} + +// brMonBuild makes a brmonitor row: a live value runs bridge under the +// helper, any other as itself. +func brMonBuild(vals []value) row { + val := vals[0] + r := row{ + Proto: "route", + Modules: bridgeModules, + Expect: expect{RC: intp(0), RefusedBy: refNone}, + Axes: mergeFacts(vals), + } + for _, p := range val.Pre { + r.Pre = append(r.Pre, preStep{Cmd: p}) + } + if val.Facts["mode"] != "live" { + r.Cmd = "bridge " + val.Arg + return r + } + words := []string{"xtcp2-nl-brmon-ws", shq(val.Arg), shq(val.Facts["trigger"])} + if u := val.Facts["until"]; u != "" { + for _, re := range strings.Split(u, "\n") { + words = append(words, shq(re)) + } + } + r.Cmd = strings.Join(words, " ") + return r +} + +// brmonitorSpace: `bridge monitor` live over five fixtures, file mode over +// the live rows' own notifications, batches, and the refusals. +func brmonitorSpace() *space { + const ( + portLife = "ip link set d3 master br0 && bridge link set dev d3 cost 9 && ip link set d3 nomaster" + netdev = "ip link set d3 mtu 1400 && ip link set d3 down" + fdbLife = "bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10" + + " && bridge fdb replace 02:00:00:00:0a:01 dev d2 master static vlan 10" + + " && bridge fdb del 02:00:00:00:0a:01 dev d2 master vlan 10" + + " && ip neigh add 192.0.2.5 lladdr 02:00:00:00:0a:05 dev br0" + vxLife = "bridge fdb add 00:00:00:00:00:00 dev vx0 dst 192.0.2.1" + + " && bridge fdb append 00:00:00:00:00:00 dev vx0 dst 192.0.2.2 port 4790 vni 200" + + " && bridge fdb del 00:00:00:00:00:00 dev vx0 dst 192.0.2.1" + mdbLife = "bridge mdb add dev br0 port d1 grp 239.1.1.1 permanent vid 10" + + " && bridge mdb add dev br0 port d2 grp ff0e::1 permanent vid 10" + + " && bridge mdb add dev br0 port d2 grp 01:02:03:04:05:06 permanent vid 10" + + " && bridge mdb replace dev br0 port d1 grp 239.1.1.1 permanent vid 10" + + " && bridge mdb del dev br0 port d1 grp 239.1.1.1 vid 10" + + " && bridge link set dev d2 mcast_router 2" + vlanLife = "bridge vlan add dev d1 vid 20 && bridge vlan add dev d2 vid 30-32" + + " && bridge vlan del dev d1 vid 20 && bridge vlan global set dev br0 vid 10 mcast_igmp_version 3" + vniLife = "bridge vni add dev vx1 vni 500 && bridge vni add dev vx1 vni 600-602 && bridge vni del dev vx1 vni 500" + vlan20 = "bridge vlan add dev d1 vid 20" + vlanFdb = "bridge vlan add dev d1 vid 20 && bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10" + fdbAdd = "bridge fdb add 02:00:00:00:0a:01 dev d1 master static vlan 10" + ) + cmds := make([]value, 0, 30) + cmds = append(cmds, + // Each selector, with a NEW and a DEL of its kind. + brmLive(brPos, "link", "monitor link", brmFix, brmTrig(portLife, brmMarkLink), brmSeeLink), // K11, B67 + brmLive(brPos, "fdb", "monitor fdb", brmFix, brmTrig(fdbLife, brmMarkFdb), brmSeeFdb), // K15, K16 + brmLive(brPos, "fdbvx", "monitor fdb", brmVxFix, brmTrig(vxLife, brmMarkVx), brmSeeFdb), // a remote entry + brmLive(brPos, "mdb", "monitor mdb", brmMdbFix, brmTrig(mdbLife, brmMarkMdb), brmSeeMdb), // K14 + brmLive(brPos, "vlan", "monitor vlan", brmVlanFix, brmTrig(vlanLife, brmMarkVlan), brmSeeVlan), // K10, K12, B70 + brmLive(brPos, "vni", "monitor vni", brmVniFix, brmTrig(vniLife, brmMarkVni), brmSeeVni), // K13 + brmLive(brPos, "fdbvlan", "monitor fdb vlan", brmFix, brmTrig(vlanFdb, brmMarkVlan), brmSeeVlan), // two selectors + // The groups a bare monitor and all join, and word order. + brmLive(brCorner, "bare", "monitor", brmFix, brmTrig(vlan20, brmMarkFdb), brmSeeFdb), // B58, K10 + brmLive(brCorner, "all", "monitor all", brmFix, brmTrig(vlan20, brmMarkFdb), brmSeeFdb), // B58, banners + brmLive(brCorner, "alllink", "monitor all link", brmFix, brmTrig(vlanFdb, brmMarkLink), brmSeeLink), // B60 + brmLive(brCorner, "linkall", "monitor link all", brmFix, brmTrig(vlanFdb, brmMarkLink), brmSeeLink), // B60 + brmLive(brCorner, "prefix", "monitor v", brmFix, brmTrig(vlan20, brmMarkVlan), brmSeeVlan), // B59 + brmLive(brCorner, "prefix", "monitor fd", brmFix, brmTrig(fdbAdd, brmMarkFdb), brmSeeFdb), // B59 + // The printers in monitor mode. + brmLive(brCorner, "netdev", "monitor link", brmFix, brmTrig(netdev, brmMarkLink), brmSeeLink), // B67 + // Options. + brmLive(brCorner, "stamp", "-t monitor fdb", brmFix, brmTrig(fdbAdd, brmMarkFdb), brmSeeFdb), + brmLive(brCorner, "json", "-j monitor fdb", brmFix, brmTrig(fdbAdd, brmMarkFdb), brmSeeFdb), // B61 + brmLive(brPos, "details", "-d monitor link", brmFix, brmTrig(portLife, brmMarkLink), brmSeeLink), + brmLive(brPos, "stats", "-s monitor vlan", brmVlanFix, brmTrig(vlan20, brmMarkVlan), brmSeeVlan), + ) + // File mode over brmFix, whose names the records' ifindexes resolve to + // by RTM_GETLINK (no ll_init_map, B66). + events := append(clonePre(brmFix), monFile(brmEvents())) + one := append(clonePre(brmFix), monFile(brmOne())) + cmds = append(cmds, + monOffline(brPos, "file", "monitor file m.bin", events), + monOffline(brCorner, "file", "monitor file m.bin link", events), // B65 + monOffline(brCorner, "file", "monitor file m.bin all", events), // banners + monOffline(brCorner, "file", "-t monitor file m.bin", events), // B75 + monOffline(brCorner, "file", "-j monitor file m.bin", events), // B61 + monOffline(brPos, "file", "-d -s monitor file m.bin", events), + monOffline(brBoundary, "one", "monitor file m.bin", one), + monOffline(brBoundary, "empty", "monitor file m.bin", append(clonePre(brmFix), ": > m.bin")), + ) + // Batches: statics that outlive the line (B62, B64, B69). + for _, b := range []struct { + name, opts string + lines []string + }{ + {"filter-then-file", "", []string{"fdb show dev d1", "monitor file m.bin"}}, // B69 + {"all-then-file", "", []string{"monitor file m.bin all", "monitor file m.bin"}}, // B62 + {"show-then-stamped-file", "-t", []string{"fdb show", "monitor file m.bin"}}, // B64 + {"file-then-file", "", []string{"monitor file m.bin", "monitor file m.bin link"}}, // a file needs no rth + } { + v := bb(brCorner, "file", b.name, b.opts, false, batchFile(b.lines...), events) + v.Facts["mode"] = "file" + cmds = append(cmds, v) + } + tool := expect{RC: intp(255), RefusedBy: refIproute2} + // The dump that fails on the closed rth never reaches the wire; every + // request that did, the file's name lookups, was acknowledged. + ack1 := expect{RC: intp(1), RefusedBy: refAckThenFail} + rec := monRec(unix.RTM_NEWNEIGH, 0, monBody(brmFdbHex, 0), 0) + brmBatchBad := func(name, opts string, lines []string, exp expect, why string) badValue { + b := bbBad("file", name, opts, false, batchFile(lines...), events, exp, why) + b.Value.Facts["mode"] = "file" + return b + } + bad := []badValue{ + monBad("bare", "monitor help", nil, tool, "help prints the usage and exits 255 (B72)"), + monBad("bare", "monitor h", nil, tool, "h is help by prefix, past every selector (B59)"), + monBad("bare", "monitor f", nil, tool, "f is file, not fdb, and takes the next word (B59)"), + monBad("bare", "monitor fdbx", nil, tool, "an unknown word"), + monBad("bare", "monitor a", nil, tool, "all is strcmp: a is unknown (B59)"), + monBad("bare", "monitor vn", nil, tool, "vni is strcmp and vn no prefix of vlan: unknown (B59)"), + monBad("bare", "monitor file", nil, tool, "file with no value (B72)"), + monBad("bare", "monitor file /nonexistent", nil, tool, "Cannot fopen"), + monBad("trunc", "monitor file m.bin", append(clonePre(brmFix), monFile(rec[:len(rec)-8])), tool, + "a record cut inside its body"), + monBad("malformed", "monitor file m.bin", append(clonePre(brmFix), monFile(monRec(unix.RTM_NEWNEIGH, 0, nil, 8))), tool, + "a record whose length is under the header's"), + monBad("missing", "monitor file m.bin", + append(clonePre(brmFix), monFile(monRec(unix.RTM_NEWTUNNEL, 0, monBody(brmVniHex, brmMissingIndex), 0))), + expect{RC: intp(0), Errno: "ENODEV", RefusedBy: refKernelIgnored}, + "a record's ifindex the host lacks: ll_link_get's RTM_GETLINK gets ENODEV and the name is if9, rc 0 (B66)"), + brmBatchBad("file-then-show", "", []string{"monitor file m.bin", "vlan show"}, ack1, + "monitor closed rth, so the show's dump request fails with EBADF and exits 1 (B63)"), + brmBatchBad("all-then-show", "", []string{"monitor file m.bin all", "fdb show"}, ack1, + "the banner would leak into the show, but B63's EBADF exits first (B62)"), + brmBatchBad("missing-then-show", "-force", []string{"monitor file /nonexistent", "link show"}, tool, + "Cannot fopen exits -1, which ends even a -force batch"), + } + return &space{ + Name: "brmonitor", + Axes: []axis{{Name: "cmd", Values: cmds}}, + Bad: bad, + Build: brMonBuild, + NegBase: func([]value) bool { return true }, + } +} diff --git a/tools/nlcapgen/matrix_brmonitor_test.go b/tools/nlcapgen/matrix_brmonitor_test.go new file mode 100644 index 000000000..062f20dbb --- /dev/null +++ b/tools/nlcapgen/matrix_brmonitor_test.go @@ -0,0 +1,250 @@ +package main + +import ( + "bytes" + "encoding/base64" + "encoding/binary" + "fmt" + "strings" + "testing" + + "golang.org/x/sys/unix" +) + +// TestBrMonitorSpace pins the bridge monitor rows (gobridge 25C): `bridge +// monitor` live under xtcp2-nl-brmon-ws over five fixtures, `bridge +// monitor file` over the live rows' own notifications, batches that carry +// monitor's statics, and the refusals. Rows are keyed by their cmd value's +// name. +// +// go test ./tools/nlcapgen/ -run TestBrMonitorSpace +func TestBrMonitorSpace(t *testing.T) { + rows, err := matrixRows(families["brmonitor"](), matrixOpts{Seed: 1}) + if err != nil { + t.Fatal(err) + } + if err := checkRows(rows); err != nil { + t.Fatal(err) + } + if len(rows) != 44 { + t.Errorf("%d rows, want 44 (18 live, 12 offline and batch, 14 negatives)", len(rows)) + } + byName := map[string]row{} + for _, r := range rows { + if !strings.HasPrefix(r.ID, "brmonitor/") { + t.Errorf("%s: not in brmonitor/", r.ID) + } + if r.InitNS || r.Serial || r.Proto != "route" || strings.Join(r.Modules, ",") != strings.Join(bridgeModules, ",") { + t.Errorf("%s: initns %t serial %t proto %q modules %v", r.ID, r.InitNS, r.Serial, r.Proto, r.Modules) + } + _, name, _ := strings.Cut(r.Desc, "cmd=") + name, _, _ = strings.Cut(name, ": ") + if _, dup := byName[name]; dup { + t.Errorf("%s: name %q twice", r.ID, name) + } + byName[name] = r + } + + tests := []struct { + description string + name string // the cmd value + expected string // kind rc refused-by | mode | until count + }{ + // Positive: each selector live, with a NEW and a DEL of its kind. + {"positive: link, a port's add and delete (K11)", "link:live:monitor_link", "positive 0 none | live | 1"}, + {"positive: fdb, add, replace, delete and an AF_INET neighbor (K15, K16)", "fdb:live:monitor_fdb", "positive 0 none | live | 1"}, + {"positive: fdb, a vxlan remote", "fdbvx:live:monitor_fdb", "positive 0 none | live | 1"}, + {"positive: mdb, IPv4, IPv6 and L2 groups and a router port (K14)", "mdb:live:monitor_mdb", "positive 0 none | live | 1"}, + {"positive: vlan, a range and vlan global (K10, K12, B70)", "vlan:live:monitor_vlan", "positive 0 none | live | 1"}, + {"positive: vni, a range (K13)", "vni:live:monitor_vni", "positive 0 none | live | 1"}, + {"positive: two selectors", "fdbvlan:live:monitor_fdb_vlan", "positive 0 none | live | 1"}, + {"positive: -d", "details:live:-d_monitor_link", "positive 0 none | live | 1"}, + {"positive: -s", "stats:live:-s_monitor_vlan", "positive 0 none | live | 1"}, + {"positive: a file of every NEW and DEL type", "file:monitor_file_m.bin", "positive 0 none | file | 0"}, + {"positive: -d -s over the file", "file:-d_-s_monitor_file_m.bin", "positive 0 none | file | 0"}, + // Negative. + {"negative: help (B72)", "ng:bare:monitor_help", "negative 255 iproute2 | file | 0"}, + {"negative: h is help (B59)", "ng:bare:monitor_h", "negative 255 iproute2 | file | 0"}, + {"negative: f is file (B59)", "ng:bare:monitor_f", "negative 255 iproute2 | file | 0"}, + {"negative: an unknown word", "ng:bare:monitor_fdbx", "negative 255 iproute2 | file | 0"}, + {"negative: a is no prefix of all (B59)", "ng:bare:monitor_a", "negative 255 iproute2 | file | 0"}, + {"negative: vn is no prefix of vni (B59)", "ng:bare:monitor_vn", "negative 255 iproute2 | file | 0"}, + {"negative: file with no value (B72)", "ng:bare:monitor_file", "negative 255 iproute2 | file | 0"}, + {"negative: no such file", "ng:bare:monitor_file_/nonexistent", "negative 255 iproute2 | file | 0"}, + {"negative: a truncated record", "ng:trunc:monitor_file_m.bin", "negative 255 iproute2 | file | 0"}, + {"negative: a malformed record", "ng:malformed:monitor_file_m.bin", "negative 255 iproute2 | file | 0"}, + {"negative: a record's ifindex the host lacks, ENODEV ignored (B66)", "ng:missing:monitor_file_m.bin", "negative 0 kernel-ignored | file | 0"}, + {"negative: a show after monitor fails on the closed rth (B63)", "ng:file:batch:file-then-show", "negative 1 ack-then-fail | file | 0"}, + {"negative: the banner cannot reach a show (B62, B63)", "ng:file:batch:all-then-show", "negative 1 ack-then-fail | file | 0"}, + {"negative: Cannot fopen ends a -force batch", "ng:file:batch:missing-then-show", "negative 255 iproute2 | file | 0"}, + // Boundary. + {"boundary: a file of one record", "one:monitor_file_m.bin", "boundary 0 none | file | 0"}, + {"boundary: an empty file", "empty:monitor_file_m.bin", "boundary 0 none | file | 0"}, + // Corner. + {"corner: bare joins neither BRVLAN nor TUNNEL (B58)", "bare:live:monitor", "corner 0 none | live | 1"}, + {"corner: all, with banners (B58)", "all:live:monitor_all", "corner 0 none | live | 1"}, + {"corner: all then link (B60)", "alllink:live:monitor_all_link", "corner 0 none | live | 1"}, + {"corner: link then all (B60)", "linkall:live:monitor_link_all", "corner 0 none | live | 1"}, + {"corner: v is vlan (B59)", "prefix:live:monitor_v", "corner 0 none | live | 1"}, + {"corner: fd is fdb (B59)", "prefix:live:monitor_fd", "corner 0 none | live | 1"}, + {"corner: a plain dummy's changes print (B67)", "netdev:live:monitor_link", "corner 0 none | live | 1"}, + {"corner: -t", "stamp:live:-t_monitor_fdb", "corner 0 none | live | 1"}, + {"corner: -j is text (B61)", "json:live:-j_monitor_fdb", "corner 0 none | live | 1"}, + {"corner: file mode ignores the selector (B65)", "file:monitor_file_m.bin_link", "corner 0 none | file | 0"}, + {"corner: file mode with all's banners", "file:monitor_file_m.bin_all", "corner 0 none | file | 0"}, + {"corner: -t stamps every record, and the TSTAMP prints (B75)", "file:-t_monitor_file_m.bin", "corner 0 none | file | 0"}, + {"corner: -j over the file (B61)", "file:-j_monitor_file_m.bin", "corner 0 none | file | 0"}, + {"corner: a show's filter outlives its line (B69)", "file:batch:filter-then-file", "corner 0 none | file | 0"}, + {"corner: all's banner outlives its line (B62)", "file:batch:all-then-file", "corner 0 none | file | 0"}, + {"corner: a show zeroes -t (B64)", "file:batch:show-then-stamped-file", "corner 0 none | file | 0"}, + {"corner: a file needs no rth", "file:batch:file-then-file", "corner 0 none | file | 0"}, + } + if len(tests) != len(rows) { + t.Errorf("%d cases for %d rows", len(tests), len(rows)) + } + for _, tc := range tests { + t.Run(tc.description, func(t *testing.T) { + r, ok := byName[tc.name] + if !ok { + t.Fatalf("no row %q", tc.name) + } + kind, _, _ := strings.Cut(r.Desc, ":") + until := 0 + if u := r.Axes["until"]; u != "" { + until = len(strings.Split(u, "\n")) + } + got := fmt.Sprintf("%s %d %s | %s | %d", kind, *r.Expect.RC, r.Expect.RefusedBy, r.Axes["mode"], until) + if got != tc.expected { + t.Errorf("got %q, want %q", got, tc.expected) + } + }) + } + + all := new(strings.Builder) + for _, r := range rows { + live := r.Axes["mode"] == "live" + // A live monitor runs only under the helper, which stops it with + // SIGTERM; no negative row starts one. + if live != strings.HasPrefix(r.Cmd, "xtcp2-nl-brmon-ws ") { + t.Errorf("%s: mode %q but cmd %q", r.ID, r.Axes["mode"], r.Cmd) + } + if live && strings.HasPrefix(r.ID, "brmonitor/ng-") { + t.Errorf("%s: a negative row starts a listener", r.ID) + } + if !live && !strings.HasPrefix(r.Cmd, "bridge ") { + t.Errorf("%s: an offline row's cmd is not bridge: %q", r.ID, r.Cmd) + } + if live && (r.Axes["trigger"] == "" || r.Axes["until"] == "") { + t.Errorf("%s: a live row with no trigger or ERE", r.ID) + } + // Each batch is two lines or more. + if b := r.Axes["batch"]; b != "" { + for _, p := range r.Pre { + if strings.HasSuffix(p.Cmd, "> b.txt") && strings.Count(p.Cmd, "' '") < 1 { + t.Errorf("%s: batch %s of one line", r.ID, b) + } + } + } + text := r.Cmd + "\n" + r.Axes["trigger"] + "\n" + for _, p := range r.Pre { + text += p.Cmd + "\n" + } + // Nothing leaves the row's netns. + for _, bad := range []string{"-netns", "dev lo ", " eth0", "/sys/class/net"} { + if strings.Contains(text, bad) { + t.Errorf("%s: %q", r.ID, bad) + } + } + all.WriteString(text) + } + // Each selector's NEW and DEL among the triggers. + for _, s := range []string{"ip link set d3 master br0", "ip link set d3 nomaster", "bridge fdb add", "bridge fdb replace", + "bridge fdb del", "bridge mdb add", "bridge mdb replace", "bridge mdb del", "mcast_router 2", "bridge vlan add", + "bridge vlan del", "vlan global set", "bridge vni add", "bridge vni del", "ip neigh add", "vid 30-32", "vni 600-602"} { + if !strings.Contains(all.String(), s) { + t.Errorf("no row, trigger or fixture has %q", s) + } + } + + // The record files: each is written by a row, each record's + // attributes end where the record does (a body cut short when it was + // copied from a capture would not), and the event file holds 19 + // records of every NEW and DEL type. + types := map[uint16]int{} + for _, f := range []struct { + description string + data []byte + n int + }{ + {"the event file", brmEvents(), 19}, + {"the one-record file", brmOne(), 1}, + } { + if got := countRecs(f.data); got != f.n { + t.Errorf("%s: %d records, want %d", f.description, got, f.n) + } + if !strings.Contains(all.String(), base64.StdEncoding.EncodeToString(f.data)) { + t.Errorf("%s: no row writes it", f.description) + } + for b := f.data; len(b) >= 16; { + l := int(binary.LittleEndian.Uint32(b)) + typ := binary.LittleEndian.Uint16(b[4:]) + types[typ]++ + if err := brmAttrsEnd(typ, b[16:l]); err != nil { + t.Errorf("%s: type %d: %v", f.description, typ, err) + } + b = b[(l+3)&^3:] + } + } + for _, typ := range []uint16{unix.RTM_NEWLINK, unix.RTM_DELLINK, unix.RTM_NEWNEIGH, unix.RTM_DELNEIGH, unix.RTM_NEWMDB, + unix.RTM_DELMDB, unix.RTM_NEWVLAN, unix.RTM_DELVLAN, unix.RTM_NEWTUNNEL, unix.RTM_DELTUNNEL, brmTstampCst, unix.RTM_NEWROUTE} { + if types[typ] == 0 { + t.Errorf("no record of type %d", typ) + } + } + + // Determinism: the same seed writes the same bytes. + var a, b bytes.Buffer + for _, buf := range []*bytes.Buffer{&a, &b} { + rows, err := matrixRows(families["brmonitor"](), matrixOpts{Seed: 1}) + if err != nil { + t.Fatal(err) + } + if err := writeRows(buf, nil, rows); err != nil { + t.Fatal(err) + } + } + if !bytes.Equal(a.Bytes(), b.Bytes()) { + t.Error("two runs with seed 1 differ") + } +} + +// brmAttrsEnd walks a record body's top-level attributes past its family +// header and fails unless the last one ends at the body's end. +func brmAttrsEnd(typ uint16, body []byte) error { + hdr := map[uint16]int{ + unix.RTM_NEWLINK: 16, unix.RTM_DELLINK: 16, // ifinfomsg + unix.RTM_NEWNEIGH: 12, unix.RTM_DELNEIGH: 12, // ndmsg + unix.RTM_NEWMDB: 8, unix.RTM_DELMDB: 8, // br_port_msg + unix.RTM_NEWVLAN: 8, unix.RTM_DELVLAN: 8, // br_vlan_msg + unix.RTM_NEWTUNNEL: 8, unix.RTM_DELTUNNEL: 8, // tunnel_msg + } + h, ok := hdr[typ] + if !ok { + return nil + } + if len(body) < h { + return fmt.Errorf("body of %d bytes, header %d", len(body), h) + } + b := body[h:] + for len(b) >= 4 { + l := int(binary.LittleEndian.Uint16(b)) + if l < 4 || l > len(b) { + return fmt.Errorf("attribute of %d bytes with %d left", l, len(b)) + } + b = b[min((l+3)&^3, len(b)):] + } + if len(b) != 0 { + return fmt.Errorf("%d bytes after the last attribute", len(b)) + } + return nil +}