Skip to content

bgp: leak prevention rfc9234#120

Open
Paul-weqe wants to merge 7 commits into
holo-routing:masterfrom
Paul-weqe:bgp-leak-prevention-rfc9234
Open

bgp: leak prevention rfc9234#120
Paul-weqe wants to merge 7 commits into
holo-routing:masterfrom
Paul-weqe:bgp-leak-prevention-rfc9234

Conversation

@Paul-weqe

@Paul-weqe Paul-weqe commented Apr 18, 2026

Copy link
Copy Markdown
Member

Replacing #109 which had become messy with a cleaner PR.

This PR implements RFC 9234 which introdoces BGP roles (Customer, Provider, Peer, RS and RS-Client) to prevent leak prevention.

Confirmance tests have been updated accordingly.

- introduced the role to the capability header folowing the respective RoleName
  enum value.
- add role to NeighborConfig. This can so far be modified via the
  bgp::neighbors::neighbor::role::PATH. This will be changed to
  bgp::neighbors::neighbor::roles::role::PATH.
- TryFromYang implementation for RoleName has been completed.

Signed-off-by: Paul Wekesa <paul1tw1@gmail.com>
Additional items:
- decoding of Capability::Role successfully.
- Customized errors for BGP Role.
- Verification added for allowed role correctness Specified here:
  https://www.rfc-editor.org/rfc/rfc9234#name-role-correctness

- Add delete_apply for roles configuration.
- Yang description for the role list on bgp augmentation.

Discarded items:
- no-role field in role. Replaced with Option<Role> in configuration.

Signed-off-by: Paul Wekesa <paul1tw1@gmail.com>
- Add BGP Notification when there is a Role Mismatch.
- Add remote_role to the Neighbor info.
- change nbr_role naming to remote_role.
- Add RoleMismatch Error Subcode.

Signed-off-by: Paul Wekesa <paul1tw1@gmail.com>
- Introduce the Only To Customer (OTC) optional transitive attribute.
- Move RoleName to holo-utils/bgp.rs

Signed-off-by: Paul Wekesa <paul1tw1@gmail.com>
Make sure the OTC is added before route is sent to Customer, peer or
RS-Client. Additional check for if route is locally originated has
been added.

Move the RoleName to iana file.

Signed-off-by: Paul Wekesa <paul1tw1@gmail.com>
Add strict mode as defined in RFC 9234.
When enabled, Neighbor must also send their local role for BGP session
to be established.

Additionally, Undefined role has been introduced.

Signed-off-by: Paul Wekesa <paul1tw1@gmail.com>
@Paul-weqe Paul-weqe requested a review from rwestphal April 18, 2026 15:09
Paul-weqe added a commit to holo-routing/holo-munet-topologies that referenced this pull request Apr 18, 2026
Add topology for verification of RFC 9234.
Meant to be tested alongside: holo-routing/holo#120
once it is implemented.

Signed-off-by: Paul Wekesa <paul1tw1@gmail.com>
@Paul-weqe Paul-weqe force-pushed the bgp-leak-prevention-rfc9234 branch from c1d674b to 07b38b8 Compare April 19, 2026 05:27
@Paul-weqe

Paul-weqe commented Apr 19, 2026

Copy link
Copy Markdown
Member Author

Squashed the two conformance test commits: one modifying the existing conformance tests output and the other introducing a new conformance test for Role verification.

PR Is officially ready for review.

@Paul-weqe Paul-weqe force-pushed the bgp-leak-prevention-rfc9234 branch from 07b38b8 to e9d7ced Compare April 23, 2026 04:09
- Update existing conformance tests coming with changes made on
  implementation of route leak prevention.
- Introduce new conformance topology (topo1-1) for BGP. Additional
  information can be found in
  holo-routing/holo-munet-topologies#7

Signed-off-by: Paul Wekesa <paul1tw1@gmail.com>
@Paul-weqe Paul-weqe force-pushed the bgp-leak-prevention-rfc9234 branch from e9d7ced to 875ea7d Compare April 23, 2026 04:22
@Paul-weqe Paul-weqe changed the title Bgp leak prevention rfc9234 bgp: leak prevention rfc9234 Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant