Repository navigation
Conversation
Every routing metric or constraint object starts with Type, 16 bits of flags and a Length octet, then Length octets of body (RFC 6551, 2.1). DAGMCObjUnknown, used for types without their own class, read a 1-octet length right after Type, so it took the first flags octet as its length: an object of type 9 with a 2-octet body ended after its header and the Hop Count after it became part of its data. The class now has the common header of DAGMCObj and a body of Length octets. olen stays as a deprecated name of len. AI-Assisted: yes (Claude Opus 5.5)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5299 +/- ##
==========================================
+ Coverage 80.06% 80.14% +0.08%
==========================================
Files 375 375
Lines 98775 98776 +1
==========================================
+ Hits 79083 79168 +85
+ Misses 19692 19608 -84
🚀 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 object of a type scapy has no class for (anything other than types 1 to 8) is read with the wrong header, and the objects after it are lost. Every routing metric or constraint object starts with Type, 16 bits of flags and a Length octet, then Length octets of body (RFC 6551, 2.1).
DAGMCObjUnknownread a length octet right after Type, so it took the first flags octet as its length and the following object became part of its data or its payload.DAGMCObjUnknownnow subclassesDAGMCObj, so it has the common header, and itsodataholds Length octets of body.olenis kept as a deprecated name oflen. A built unknown object now writes the 4-octet header (09 00 00 02 ab cdfor type 9 with bodyab cd, where09 02 ab cdwas written before), and its defaultotypeis theDAGMCObjdefault 0 instead of 3 (Hop Count, which has its own class).Before:
After:
tshark 4.6.9 decodes that container as the same three objects. With a non-empty unknown body, tshark reads the same 4-octet header but does not skip the body (the default branch of its metric loop does not advance), so the split there follows the RFC Length. A test is added to
test/contrib/rpl.uts.This message was written with the help of AI (Claude Opus 5.5).