Skip to content

Extract VPC peering import direction as a tested renderer contract #5109

Description

@chet

The overlap-safety work needs the same answer as the existing Ethernet Virtualizer renderer: for a given peering policy and receiver/peer virtualization types, does the receiver import the peer's prefixes? That decision currently lives inside rendering code and should not be reimplemented inside a new routing-safety subsystem.

Scope

  • Extract the existing peering-direction decision into one small pure helper next to the renderer that owns the behavior.
  • Keep the renderer as an authoritative production caller.
  • Name the inputs and output around route import, not around future overlap implementation details.
  • Cover the complete policy × receiver type × peer type matrix with table-driven tests.

Acceptance criteria

  • Exclusive, Mixed, and None behavior is covered for every supported receiver and peer virtualization type.
  • Existing rendered network behavior is unchanged.
  • The helper has no database, configuration, admission, or lifecycle dependency.
  • A later route-policy admission PR can reuse the contract without duplicating renderer logic.

Out of scope

  • Prefix-overlap admission.
  • VPC peering persistence or lifecycle changes.
  • A shared routing_safety.rs module.

Dependencies

Reference implementation and test corpus: #4940. Part of #3890 and #3883.

Metadata

Metadata

Assignees

Labels

networkingaffects DPU networking systems (EVPN, BGP, HBN, OVS)securityThings affecting host security (attestation, santization, etc)

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions