Implement RFC 7607 handling for AS 0#759
Open
MorganaFuture wants to merge 1 commit into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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