Repository navigation
refactor(protocols)!: range-check the IPv6 extension, MH, HIP and IPv4 makers and adopt the shared helpers (#2614) - #2677
Merged
Conversation
…4 makers and adopt the shared helpers (#2614) - _make_uint: every integer argument of the MH message, option and sub-option makers and of the HIP parameter makers, HIP.make's header fields, and the HOPOPT, IPv6-Opts, IPv4 and IPv6-Route option and header fields refuse a negative, too wide or bool value instead of wrapping it. - _make_uint: the HOPOPT and IPv6-Opts Hdr Ext Len, the IPv4 IHL and the MH and HIP header lengths refuse a header too long for the field. - _make_uint: the PDM scales and deltas, the option makers' registry codes, the one-octet lengths of every MH option and the LIO, SMF_DPD and unassigned IPv6 options, the IPv4 slot counts, timestamp slots and security authorities, and HIP's RHASH_len; the HIP lifetimes refuse a bool, NaN or infinity. - _read_sint/_make_sint: MH's ANI geo-location degrees; _decode_signed goes, recorded as versionremoved. - pad_length: IPv4, HOPOPT, IPv6-Opts, IPv6-Route, MH and HIP padding. - _uint_size: HIP Diffie-Hellman and identifier widths, the ILNP nonce and the MH MN-ID. - Breaking: released makers that wrapped now raise ProtocolError, a PDM scale past one octet included, where it warned; a bool is refused for a field wider than one bit. - Tests: MH and HIP sweep tables, option registry codes and MH option lengths checked against the maker signatures; every refusal fails on main; field maxima build and round-trip.
Owner
Author
|
GOOD TO GO at |
This was referenced Nov 2, 2026
This was referenced Nov 2, 2026
JarryShaw
added a commit
that referenced
this pull request
Nov 2, 2026
…TTP/2 and SCTP rebuilds into 1.6.0 (#2449) - Breaking: the IPv4, HOPOPT, IPv6-Opts, IPv6-Route, MH and HIP makers (#2677) raise on a value a field cannot hold, where 1.5.x wrote it masked; a PDM scale past one octet raises where it warned, and MH._decode_signed is removed. The entry gives the old and new values. - Fixed: an SCTP packet cut short of its declared length rebuilds as captured (#2679). - Folded into unreleased entries: a cut HTTP/2 frame after the connection preface rebuilds, into the cut-SETTINGS entry (#2675); IPv4's Quick-Start function and not-used octet refusals, into the Quick-Start entry (#2677). - No entry for the test-only 42a6133. - CHANGELOG.md regenerated; util/changelog_md.py --check passes.
1 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.
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
refactor— changes neither behaviour nor performanceDescription of your pull request and other information
The internet group of #2614, and its last: the HOPOPT, IPv6-Opts, IPv6-Route, MH, HIP and IPv4 makers take the shared value helpers on
Protocol._make_uintchecks every integer argument, header and option length, PDM scale and delta, and IPv4 slot count; HIP lifetimes refuse abool, NaN or infinity._read_sint/_make_sintcarry MH's ANI geo-location degrees, and_decode_signedgoes, recorded asversionremoved.pad_lengthpads all six;_uint_sizesizes the HIP Diffie-Hellman and identifier widths, the ILNP nonce and the MH MN-ID.Breaking: released makers that wrapped a value now raise
ProtocolError. A PDM scale past one octet used to warn and now raises, and aboolis refused for a field wider than one bit.Registry codes, the IPv4 timestamp clamp and fixed-size byte fields are left for #2676. A Sonnet cross-review re-derived the sweep, PDM, the HIP lifetimes and byte-identical parsing; the two changes it asked for are in this head.
Closes #2614