It would be useful to add basic RTR v2 ASPA PDU parsing/encoding support.
This is separate from the BGP path-attribute work: ASPA is not a BGP path attribute, it is RPKI/RTR data that can later be used for AS_PATH verification.
Initial scope:
- add RTR protocol version 2
- add ASPA PDU type 11
- parse/encode the ASPA PDU fields:
- flags
- AFI flags
- provider AS count
- customer ASN
- provider ASNs
- add basic round-trip and malformed-length tests
Out of scope for this issue:
- ASPA AS_PATH verification logic
- parsing ASPA RPKI/CMS objects directly
Relevant drafts:
Success criteria
The implementation is done when:
RtrProtocolVersion supports RTR v2.
RtrPduType supports ASPA PDU type 11.
- There is a public model for ASPA PDUs that exposes at least:
- protocol version
- flags
- AFI flags
- customer ASN
- provider ASNs
- The RTR parser can parse ASPA PDUs from bytes without panicking.
- The RTR encoder can serialize ASPA PDUs back to bytes.
- Round-trip tests pass for:
- ASPA announcement with one provider ASN
- ASPA announcement with multiple provider ASNs
- ASPA withdrawal/delete with zero provider ASNs
- Malformed input tests pass for:
- PDU length too short
- provider AS count inconsistent with payload length
- unsupported RTR version / unsupported PDU handling remains correct
- Existing RTR v0/v1 tests still pass unchanged.
- Public docs/comments clearly state that ASPA support is draft-based and does not implement AS_PATH verification.
- The full test suite passes with:
cargo test --all-features
Optional but nice:
- Add a small example or doc test showing how to inspect an ASPA PDU.
- Add changelog entry noting RTR v2 ASPA PDU parsing/encoding support.
It would be useful to add basic RTR v2 ASPA PDU parsing/encoding support.
This is separate from the BGP path-attribute work: ASPA is not a BGP path attribute, it is RPKI/RTR data that can later be used for AS_PATH verification.
Initial scope:
Out of scope for this issue:
Relevant drafts:
Success criteria
The implementation is done when:
RtrProtocolVersionsupports RTR v2.RtrPduTypesupports ASPA PDU type 11.cargo test --all-featuresOptional but nice: