Repository navigation
fix(hip): HIPv2-only parameters are accepted inside HIPv1 packets - #1160
Merged
Merged
Conversation
DH_GROUP_LIST (511), HIP_CIPHER (579), HIT_SUITE_LIST (715) and
TRANSPORT_FORMAT_LIST (2049) exist only in RFC 7401. Their readers and
makers now raise ProtocolError("invalid parameter") at version 1, the
same way R1_Counter and HIP_TRANSFORM reject a version mismatch.
Closes #1133.
Owner
Author
|
Cross-review verdict on
|
Contributor
|
Coverage: 88.87% (unit tier, Python 3.14,
Per-file detail: the |
JarryShaw
added a commit
that referenced
this pull request
Oct 7, 2026
- 4 new 1.5.0 entries: HTTP/2 sample stream identifiers (#1161), TCP option re-padding (#1163, breaking), format='pcap' output (#1164), declared lengths on truncated captures (#1166, breaking) - extend the PCAP Header (#1159), HIP (#1160) and from_data round-trip (#1162) entries rather than duplicating them - regenerate CHANGELOG.md with util/changelog_md.py - process.rst: entry-count pin re-measured, 189 -> 193 tests/project: conventions_doc_claims, changelog_md and documentation_claims pass; changelog_md.py --check is in step.
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.
Please follow the guide below
You will be asked some questions, please read them carefully and answer honestly
Put an
xinto all the boxes [ ] relevant to your pull request (like that [x])Use Preview tab to see how your pull request will actually look like
Searched for similar pull requests
Followed the coding style (
make pylint,make mypy,make isort): ran the three on the two touched files only. mypy and isort are clean, and pylint reports nothing new on the added linesmake testpasses, and a test case covers the change. Ran only the modules listed below, not the full suiteAdded a changelog entry under
docs/source/changelog/and regeneratedCHANGELOG.md, if the change is user-visible — N/A, added centrally after the waveWhat is the purpose of your pull request?
Tick the commit type your subject line carries.
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 #1133. At version 1,
DH_GROUP_LIST,HIP_CIPHER,HIT_SUITE_LISTandTRANSPORT_FORMAT_LISTnow raiseProtocolError('HIPv1: [ParamNo N] invalid parameter')in both the reader and the maker. The issue asks for a warning, butR1_CounterandHIP_TRANSFORMactually raise on a version mismatch, so this matches the raise.Length12/20, and the maker fixesRHASH_lenat 64.tests/protocols/internet/test_hip_v2_only_parameters_unit.py: without the fix8 failed, 3 passed, 4 subtests passed(4 make + 4 read subtests fail). With it3 passed, 12 subtests passed.test_hip_unit34 passed / 168 subtests,test_hip_cipher_limit_unit2,test_hip_r1_counter_width_unit4,test_option_roundtrip_unit6 / 360,test_docstring_contract7,tests/project389 passed, 1 skipped.