Repository navigation
fix(hip)!: parse and keep the two fixed header bits (#1459) - #1462
Merged
Merged
Conversation
RFC 7401 section 5.1 reserves the leading bit of Packet Type and the low-order bit of Version for SHIM6: "MUST be set as shown when sending and MUST be ignored when receiving". HIP.read raised ProtocolError unless they read 0 and 1. - read() no longer validates them and keeps them as the new required Data_HIP fields packet_fixed and version_fixed. - make() takes packet_fixed=0 and version_fixed=1, the RFC values, and _make_data passes them through, so from_data rebuilds byte-exact. - test_hip_unit: the two cases that pinned the rejection now pin the parse.
3 of 5 tasks
Owner
Author
|
Verdict: GOOD TO GO at
Merge note: #1454's |
Contributor
|
Coverage: 89.51% (unit tier, Python 3.14,
Per-file detail: the |
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.
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.
make pylint,make mypy,make isort) — mypy only: 0 errors in the three HIP filesmake testpasses, and a test case covers the change —protocols/internetleg, capture round-trip,tests/projectdocs/source/changelog/and regeneratedCHANGELOG.md, if the change is user-visible — N/A — centralised in docs(changelog): shared 1.5.0 changelog — long-lived, merges last (#610, #616, #617, #618, #620) #657What is the purpose of your pull request?
fix— corrects a defectfeat— adds a featureperf— changes performance, not behaviourrefactor— changes neither behaviour nor performancetest— tests onlydocs— documentation onlyci— workflows or build toolingrelease— bumps the version or rolls up a distributionchore— anything elseDescription of your pull request and other information
Closes #1459
RFC 7401 §5.1: the two fixed bits "MUST be ignored when receiving".
read()no longer rejects them and keeps them aspacket_fixedandversion_fixed.make()writes them, defaulting to the RFC values0/1.Breaking:
Data_HIPgains two required fields.Before:
59 04 10 20 …and59 04 90 21 …raisedProtocolError: HIP: invalid format. After: both parse andfrom_datarebuilds them byte-exact.New
test_hip_fixed_bits_unit.pyfails 7 of 8 checks without the fix. Two cases intest_hip_unit.pythat pinned the rejection now pin the parse. Legprotocols/internet: 604 tests, 0 failures. Capture round-trip: 4 passed.tests/project: 419 passed, 1 skipped.examples/capturesinfo: 1567 frames unchanged; the 49 HIP frames differ only by the two new keys.