Skip to content

Implement RFC 7607 handling for AS 0#759

Open
MorganaFuture wants to merge 1 commit into
oxidecomputer:mainfrom
MorganaFuture:bgp-rfc7607-as0
Open

Implement RFC 7607 handling for AS 0#759
MorganaFuture wants to merge 1 commit into
oxidecomputer:mainfrom
MorganaFuture:bgp-rfc7607-as0

Conversation

@MorganaFuture
Copy link
Copy Markdown

AS 0 is reserved by IANA and must never appear on the wire. This codifies the restriction on rdb::Asn (is_reserved) and enforces it at the BGP boundaries: a peer OPEN advertising AS 0 is rejected with a Bad Peer AS notification; AS 0 in AS_PATH/AS4_PATH/AGGREGATOR/AS4_AGGREGATOR makes an UPDATE malformed, handled through the existing RFC 7606 path (treat-as-withdraw for the paths, attribute-discard for the aggregators); and a local ASN of 0 can no longer be configured, with any such router persisted by an earlier version skipped at startup so upgrades don't fail.

Tested with new unit tests for the OPEN, UPDATE, and config paths, plus is_reserved. Ran the BGP and rdb unit suites; the TCP integration tests need a privileged host for loopback IPs and weren't run.

Fixes: #706

AS 0 is reserved and must never appear on the wire. Codify the
restriction on rdb::Asn (is_reserved) and enforce it at the BGP
boundaries:

- reject a peer OPEN whose My Autonomous System is 0 with an
  OPEN Message Error / Bad Peer AS notification;
- treat AS 0 in AS_PATH/AS4_PATH/AGGREGATOR/AS4_AGGREGATOR as a
  malformed UPDATE, routed through the existing RFC 7606 handling
  (treat-as-withdraw for the paths, attribute-discard for the
  aggregators);
- refuse to configure a local ASN of 0, and skip any such router
  persisted by an earlier version at startup.

Fixes: oxidecomputer#706
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.

bgp: consider implementing RFC 7607 handling for ASN 0

1 participant