Repository navigation
fix(ipv6-route): rebuild RPL source routes byte for byte (#1456, #1457) - #1463
Merged
Merged
Conversation
- Compress a parsed address again on rebuild: Addresses[n] by CmprE, the rest by CmprI, so an RPL header inside IPv6 keeps its width (#1456). - Split the address list by the span Hdr Ext Len declares, not by the octets read; an address the capture cut short stays the raw bytes read instead of decoding as IPv4 or raising a builtins ValueError (#1457). - Pass the parsed Hdr Ext Len through from_data via a new make() hdr_ext_len argument, so a truncated header keeps its length (#1457). - make(): clamp CmprI/CmprE to 15, set CmprI to 0 for one address, and raise ProtocolError for an empty address list. New tests/protocols/internet/test_ipv6_route_rpl_roundtrip_unit.py.
Contributor
|
Coverage: 89.51% (unit tier, Python 3.14,
Per-file detail: the |
Owner
Author
|
Verdict: GOOD TO GO at
Merge note for #1454. Its #1456/#1457 entries go stale when this merges: 20 flip to OK. Two in-IPv6 cut55 entries flip to PADDED and should be re-homed under #1458. |
JarryShaw
added a commit
that referenced
this pull request
Oct 9, 2026
…fixed #1454 merged before the three fixes, so its stale-entry check now fails on main: #1455 (L2TPv2/OSPF trailer), #1456/#1457 (RPL) and #1459 (HIP fixed bits) all come back OK. Drop those entries. The HIP fixed-bit cuts and two RPL in-IPv6 cut55 cases now parse but zero-fill, so they move under the #1451/#1458 short-read gaps. All four edge modules pass.
Merged
3 of 5 tasks
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.
pylint(Makefile flags) on the 2 modules: only the existing-pattern findings;mypy: no error in changed lines;isortnot runmake testpasses, and a test case covers the change —protocols/internetleg 608 OK;test_capture_roundtrip_runtime.py4 passed, 20501 subtests;tests/project419 passed, 1 skippedWhat is the purpose of your pull request?
fix— corrects a defectDescription of your pull request and other information
Closes #1456
Closes #1457
Addresses[n]by CmprE, the rest by CmprI). fix(ipv6-route): an RPL routing header inside IPv6 loses its address compression on rebuild #1456 repro: 80 → 64 octets.rt[:23]: builtinsValueError→ exact.rt[:12]:IPv4Address('1.2.3.4')→ exact.from_datapasses the parsed Hdr Ext Len through a new optionalmake(hdr_ext_len=). CmprI=CmprE=8 cut at 12: Hdr Ext Len 1 → 2.make(): CmprI/CmprE are clamped to 15, CmprI is 0 for a single address, and an emptyipraisesProtocolError. Before, a single address withdstraisedFieldValueError, and an emptyipwithdstraisedIndexError.Sweep over every CmprI/CmprE pair (0–15), 1–3 addresses, two Pad values, alone and inside IPv6: full headers are 3072/3072 exact. A cut inside the address list or Pad is exact only when Pad is 0. Otherwise the unread Pad octets come back zero-filled by
PaddingField, which is the corekit short-read in #1458 and is left to it. With that one patched, all 75264 cuts are exact.New test
tests/protocols/internet/test_ipv6_route_rpl_roundtrip_unit.py: all 7 tests fail onmain(6480 failures).