Repository navigation
Conversation
The COMMUNITIES path attribute (RFC 1997) holds a list of 4-byte values, but BGPPACommunity only dissected the first one and left the others as Raw. Chain the remaining communities as BGPPACommunity layers. Fixes secdev#4071 AI-Assisted: yes (Claude Opus 5.5) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gpotter2
reviewed
Oct 25, 2026
|
|
||
| def default_payload_class(self, payload): | ||
| # The attribute value is a list of 4-byte communities | ||
| return BGPPACommunity |
Member
There was a problem hiding this comment.
Could you use a bind_layers instead? Thanks
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.
Description
The COMMUNITIES path attribute (RFC 1997) is a list of 4-byte values, but
BGPPACommunityonly dissects the first one, and the others end up asRaw:This PR sets
default_payload_classso the remaining values are dissected as moreBGPPACommunitylayers. Thecommunityfield and building are unchanged. AFieldListFieldlike inBGPPAClusterListwould also work, but it would rename the publiccommunityfield.The first point of the issue (values outside
well_known_communities) already works, e.g.BGPPACommunity(community=0xFC00000B).Fixes #4071
This message was written with the help of AI (Claude Opus 5.5). I checked the change and the tests myself.