fix(evpn): surface cross-class mis-stamped managed netdevs; harden VRF/L3VXLAN validation#578
Merged
Merged
Conversation
…F/L3VXLAN validation - restore all-class visibility in the managed-netdev status scan: a link carrying a rustbgpd ownership stamp of a class that does not match its kind is now reported owned-unsafe instead of being silently dropped, satisfying ADR-0091 Decision 6 (fail-closed states must be observable); the fallback never double-emits and reap stays class-exact (status-only change) - reword the owned-unsafe status reasons across all four classes to accurately cover wrong-class / multiple-stamp / stamp-name-mismatch - reject reserved VRF table_ids (252-255), a VRF table_id colliding with a [[fib_tables]] table_id, and an L3VXLAN VNI (L3VNI) colliding with a fixed-VNI VXLAN VNI (L2VNI)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #577. Fixes the one real finding from review plus deferred-lifecycle validation hardening. Status/validation only — no change to
compute_managed_netdev_opsor any reap gate (reap stays class-exact).rustbgpd:vxlan:…altname) was silently dropped from status — on the prior code it surfaced asowned-unsafe. Restored an all-class fallback so any rustbgpd-stamped link still surfaces (owned-unsafe), never hidden. The fallback never double-emits, and a vxlan-kind link still reports exactly one row.table_ids (252–255), a VRFtable_idcolliding with a[[fib_tables]]table_id, and an L3VXLAN VNI (L3VNI) colliding with a fixed-VNI VXLAN VNI (L2VNI). Operator-provisionedvrf=/bridge=references are intentionally NOT hard-validated (legitimate; fail-closed at runtime).Testing
cargo test -p rustbgpd-evpn-linux managed_netdev_status(cross-class mis-stamp surfaced; vxlan-kind emits exactly one; correctly-stamped orphan stillorphaned)cargo test -p rustbgpd config::tests::managed_netdevs(reserved-table-id, vrf/fib_tables collision, l3vxlan/vxlan VNI collision, valid multi-class loads)cargo clippy --workspace --all-targets -- -D warnings,cargo fmt --all -- --check