Repository navigation
fix(corekit): end a cut list of plain values with the data, not in zero-filled items (#2760) - #2766
Merged
Merged
Conversation
…ro-filled items (#2760) A cut ListField of plain values read on past the data, each item zero-filled, so a cut IGMPv3 group record held its counted sources as 0.0.0.0. It now ends with the data as a list of schema items has done since #2756; the item the cut lands inside reads zeros past it. - ListField._unpack_items stops a plain list at the octets present; a length no whole number of items fills is still refused. - An item read from a list's zero fill hands the fill's start on through Schema.unpack (__data_present__), so a list in it ends with the data; unread fill goes back to the ledger. - Radiotap passes __zero_tail__ for a short TLV item, whose missing octets are zeros (#2655). - IGMPv3 Query data gains num_sources and make() a num_sources keyword; _make_data keeps the count of an unedited cut source list and lets make() count edited sources. Tests failing on c211805: every plain-value list cut at every offset; IGMPv3, IPv6-Route.
Owner
Author
|
GOOD TO GO at
|
Contributor
|
Coverage: 94.45% (unit tier, Python 3.15,
Per-file detail: the |
JarryShaw
added a commit
that referenced
this pull request
Nov 4, 2026
- #2766 (Fixed): a cut list of plain values ends with the data, where 1.5.x read zero values past the cut (a cut Type 0 Routing header, measured on v1.5.1), into the ListField entry; IGMPv3's sources and the Query's num_sources, into the IGMP entry. - #2767: a cut header rebuilt on its own reads back its parsed values, a regression of the 1.6.0 rebuild path, into the cut-header Fixed entry; the round-trip test rule, into the conventions entry. - #2764: SSLv2, TLS and DTLS records rebuild from their to_dict(), into the TLS/DTLS Added entry, as those classes never shipped. - #2765: the further member reorders and guard rules, into the member-order entry, which records the earlier #2490 reorders. - CHANGELOG.md regenerated; util/changelog_md.py --check passes.
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?
fix— corrects a defectDescription of your pull request and other information
#2758 stopped schema-item lists from reading past the capture. Lists of plain values still did: a cut IGMPv3
sourcesgave['10.0.0.1', '0.0.0.0', '0.0.0.0']. All 37 plain-valueListFields did the same: HIP, IGMPv3, IPv4, IPv6-Route, MH, Radiotap, SCTP and TCP.ListField._unpack_itemsnow stops a plain list at the captured octets. The item the cut lands inside zero-fills itself, as any field does.__data_present__key._give_back_fillreturns the unread zeros to the padding budget.__zero_tail__key keeps feat(link): decode radiotap TLV items a producer cut short #2655: a Radiotap TLV that a producer left short still reads its missing octets as zero items.Data_Querygainsnum_sources, andmake()gains anum_sourceskeyword. An unedited cut keeps its declared count and an edited one recounts, so every rebuild stays byte-exact from bothinfoandto_dict().Closes #2760