From 07798493ef96c0402a5095e5349f8d1f0661d4b3 Mon Sep 17 00:00:00 2001 From: Marcin Zieba Date: Tue, 15 Sep 2026 13:17:22 +0200 Subject: [PATCH] docs: state the boundary row rule by stack position The walk sections claimed that every interface yields two zero-index boundary rows. The MIB emits a zero higher sub-layer row only when no interface runs over that interface, and a zero lower sub-layer row only when it runs over no other interface. A reader who compared a real walk against the documented claim found rows missing, and could not tell whether the daemon or the document was wrong. An adversarial review caught a second error in the first correction, which keyed the rule to interface type. A bond with a VLAN above it and members below gets no boundary row at all, and a bond with no members gets both. The rule follows the position in the stack, not the kind of interface, so the type based examples are gone. The emit rules section said a plain interface has both rows. It now says standalone, the glossary term, so it cannot be read as covering a bond member. CONTEXT.md keeps the definition of a boundary row. No source file and no test changed. Closes #16 --- CLAUDE.md | 3 ++- README.md | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 3036ef8..425516d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -148,7 +148,8 @@ ip -details -json link show A bond or bridge yields one row per member, with the master's ifIndex first. A VLAN yields one row with the VLAN's ifIndex first and its base interface second. -Every interface also yields the two zero-index boundary rows RFC 2863 requires. +An interface has a zero higher sub-layer row only if no interface runs over it. +It has a zero lower sub-layer row only if it runs over no other interface. ## Prior art worth reading before writing the session loop diff --git a/README.md b/README.md index 89b2bf7..eae2951 100644 --- a/README.md +++ b/README.md @@ -196,7 +196,7 @@ runs over that bond (9), so its row is `10.9`. Emit only direct relationships. A VLAN on a bond adds a `(VLAN, bond)` row. It does not add VLAN-to-member rows. Include zero-index rows for each -missing side of the emitted stack. A plain interface has both `(0, index)` +missing side of the emitted stack. A standalone interface has both `(0, index)` and `(index, 0)`. Consumers wanting only real relationships filter those rows. Counts of non-zero relationships exclude boundary rows. Tests assert the two sets separately. @@ -330,4 +330,5 @@ ip -details -json link show A bond or bridge yields one row per member, with the master's ifIndex first. A VLAN yields one row with the VLAN's ifIndex first and its base interface second. -Every interface also yields the two zero-index boundary rows RFC 2863 requires. +An interface has a zero higher sub-layer row only if no interface runs over it. +It has a zero lower sub-layer row only if it runs over no other interface.