Repository navigation
Conversation
A DAG Metric Container lists its routing metric objects back to back, each a 4-octet header and a body of Length octets (RFC 6551, 2.1). The object classes had no extract_padding, so the first object kept the rest of the list as its payload: a container with ETX and Hop Count dissected as one ETX object followed by raw bytes. End each object after its Length octets of body, or after its declared fields if those are longer, so the next one starts there. Body octets beyond the declared fields, such as a second Link Color, stay in the object's payload. AI-Assisted: yes (Claude Opus 5.5, GPT-6.1 Sol)
RFC 6551 (4.4.1) allows Link Color only as a recorded metric, so the test object sets the R flag. AI-Assisted: yes (Claude Opus 5.5, GPT-6.1 Sol)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5272 +/- ##
=======================================
Coverage 80.56% 80.56%
=======================================
Files 375 375
Lines 98508 98511 +3
=======================================
+ Hits 79361 79365 +4
+ Misses 19147 19146 -1
🚀 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.
Description
A DAG Metric Container with more than one routing metric object dissects as the first object only. The objects follow each other directly, each a 4-octet header and a body of Length octets (RFC 6551, 2.1), but the metric object classes have no
extract_padding, so the first object keeps the rest of the list as itsRawpayload.DAGMCObjnow ends each object after its Length octets of body, or after its declared fields if those are longer, so the next object of the list starts there. Body octets beyond the fields scapy declares for an object, such as the second color of a Link Color object, stay in that object's payload.Before:
After:
Five DIOs built by hand from RFC 6551 (one to three objects, Node State and Node Energy, a recorded Link Color object with two colors) now dissect into the same object sequence that tshark decodes, with tshark's value in every field scapy declares, and each rebuilds to the same bytes. The new test in
test/contrib/rpl.utscovers the three-object container and the Link Color case.This message was written with the help of AI (Claude Opus 5.5).