Repository navigation
fix(protocols)!: parse a malformed IPv6 extension header as Raw (#2477) - #2480
Conversation
|
NEEDS CHANGES (Sonnet,
|
RFC 8200 §4 has a node discard such a packet, so the walk stops at it. - IPv6._import_next_layer: drop the IPv6_Ext fallback and __generic_ext_codes__. - The Raw the walk stopped on is the upper layer, so its error is logged once. - IPv6_Ext keeps Shim6, its only direct dispatch. - IPv6_Ext.error and read(error=) are no longer filled; see info.error on Raw. - Tests pin Raw for malformed and truncated HOPOPT/Routing/Opts/MH/HIP/AH. - mh.py docstrings and the round-trip tests no longer describe the fallback.
c40071a to
ad7cd10
Compare
|
Verified ( |
|
Base retargeted to |
|
NEEDS CHANGES (Sonnet,
|
|
Fixed ( |
|
Coverage: 94.50% (unit tier, Python 3.15,
Per-file detail: the |
|
NEEDS CHANGES (Sonnet,
|
9dd653e to
9dd5d5f
Compare
|
NEEDS CHANGES (Sonnet,
|
- IPv6._decode_next_layer: a NoPayload the walk stops on was reused as the upper layer. An overrunning Routing header with nothing after it gave NoPayload where base gives an empty Raw. Reuse only a Raw. - test_ipv6_ext_unit: pin that case as an empty Raw. - test_mh_unit: over IPv6 the MH is replaced by Raw, not IPv6_Ext. - Registry comments: IPv6_Ext is the generic parser, not a fallback.
9dd5d5f to
69d6728
Compare
|
GOOD TO GO (Sonnet,
|
make pylint,make mypy,make isort)make testpasses, and a test case covers the changedocs/source/changelog/and regeneratedCHANGELOG.md, if the change is user-visible — N/A, centralised in chore(docs): centralize 1.6.0 changelog updates in one place, not per-feature-PR #2449What is the purpose of your pull request?
fix— corrects a defectDescription of your pull request and other information
Per RFC 8200 §4, a header whose dedicated parser raises (HOPOPT, Routing, Opts, MH, HIP, Frag, AH) is now
Rawviabeholderand ends the walk;IPv6._import_next_layer'sIPv6_Extfallback and__generic_ext_codes__are removed.IPv6_Extstays the parser for Shim6, so only Shim6 matches every member name. Docs (ipv6.py,ipv6_ext.py,ipv6-ext-entry-paths, the subclassing convention) and the tests pinning the fallback are updated; new tests cover malformed and truncated headers, Shim6, and byte-exact rebuilds. Stacked on #2464.Closes #2477