Function bgpkit_parser::models::validate_role_pairs
source ยท pub fn validate_role_pairs(local_role: &BgpRole, remote_role: &BgpRole) -> bool
Expand description
Validate the local-remote BGP Role pairs.
This function checks the role correctness by following the description in Section 4.2 of RFC9234.
The acceptable local-remote BGP pairs are:
Local AS Role | Remote AS Role |
---|---|
Provider | Customer |
Customer | Provider |
RouteServer | RouterServer-Client |
RouterServer-Client | RouteServer |
Peer | Peer |