Repository navigation
Conversation
RPLOptRIO, RPLOptTgt and RPLOptTIO used the IPv6 ND prefix field, which reads the option length in 8-octet units. RPL option lengths count octets (RFC 6550, 6.7.1), so the address field read the wrong bytes: a Target followed by a Transit Information option fell back to Raw, and bytes of following options could be read as part of the address. Use an RPL field that takes len minus the fixed fields as the address size. Build output with an unset len is unchanged. 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 #5262 +/- ##
==========================================
- Coverage 80.55% 80.04% -0.51%
==========================================
Files 375 375
Lines 98399 98417 +18
==========================================
- Hits 79261 78774 -487
- Misses 19138 19643 +505
🚀 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
RPLOptRIO,RPLOptTgtandRPLOptTIOread their address from the wrong number of bytes. They use_IP6PrefixField, which reads the option length in 8-octet units as in IPv6 ND (inet6.py#L2031), while RPL option lengths count octets (RFC 6550, 6.7.1; 6.7.5 says "unlike in IPv6 ND"). A Target withlen=18followed by a Transit option without a parent address asks for 136 address bytes, gets the 22 bytes that remain, and the dissection fails, so the options areRaw. When the bytes the field takes do convert to an address, bytes of the following options can become part of it.The fix adds an RPL field that takes
lenminus the fixed fields as the address size. Build output with an unsetlenis unchanged.Before:
After:
In four RPL messages built by hand from RFC 6550 (Target /128 and /64, Transit Information with and without a parent address, Route Information /64), each option dissected at the start of the option area gives the prefixes, addresses and path fields that tshark decodes.
The option after the first one is still
Raw: RPL options do not select the next option class, which is a separate fix.This message was written with the help of AI (Claude Opus 5.5).