Return byte string for undefined BGP generic transitive extended communities sub-types#4745
Merged
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4745 +/- ##
==========================================
- Coverage 82.20% 82.20% -0.01%
==========================================
Files 361 361
Lines 87195 87196 +1
==========================================
- Hits 71680 71679 -1
- Misses 15515 15517 +2
🚀 New features to boost your workflow:
|
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.
Scapy currently fails to decode a BGP UPDATE message if it contains a generic transitive extended community with an undefined sub-type. Example:
Hex string above represents a BGP UPDATE message containing two generic transitive extended communities (type
0x80) and both have a sub-type which does not get handled inm2i()method of_ExtCommValuePacketField()class.With this patch, Scapy successfully decodes the same BGP UPDATE message and returns a byte string for the value of the extended community:
This leaves it up to the application using the Scapy library to further process those values, if needed.