Repository navigation
fix(protocols): input refusals raised as FieldValueError, FieldError or EnumValueError stay loud under the next-layer fallback (#3238) - #3255
Conversation
Documentation build overview
46 files changed ·
|
|
Needs changes at
|
e316480 to
5889c40
Compare
|
Good to go at
|
|
Coverage: 94.99% (unit tier, Python 3.15,
Per-file detail: the |
|
Rebase note: |
…or EnumValueError stay loud under the next-layer fallback (#3238) Each site is classified against the RFC-conformance convention (#3234). Structural, now raised as ProtocolError at its source, so a next-layer fallback keeps the layer raw quietly (#2588): - TCP: a flagless MP_JOIN (RFC 8684 section 3.2) and an ADD_ADDR of a length that gives no address family (section 3.4.1). - HIP: a Length short of a parameter's fixed fields, one leaving part of a list entry, and a locator type and length RFC 8046 section 4 gives no layout. - IPv6-Route: a Source Route of an odd Hdr Ext Len (RFC 2460 section 4.4). - The remainder check SCTP's lists, HIP's and IPv6-Route's share moves to pcapkit.corekit.schema.entries.whole_entries. Value rules, through pcapkit.utilities.conformance.nonconforming: - HOPOPT and IPv6-Opts: an SMF TaggerID whose TidLen RFC 6621 section 6.1.1 rules out is read as TidLen + 1 octets and warned of, and a NULL TaggerID's TidLen is checked and rebuilt. - MH: an unassigned FBack or LRA status, or IPv6 Address/Prefix or LMA Address option code, is kept as an int through MH._read_closed. - Under PCAPKIT_MIMIC=wireshark both are read and built silently, as dissect_opt_smf_dpd and packet-mip6.c read them. The RFC-conformance page names the helper, and the mimic-mode table gains the MH and SMF rows. A real pcapkit bug at these sites stays loud.
5889c40 to
3cff3c3
Compare
|
Rebased from
|
|
Integration check after #3256: this PR's CI ran against
There were no failures, so the combination is green. |
Please follow the guide below
Put an
xinto every box [ ] that applies to your pull request (like this: [x])Use the Preview tab to see how your pull request will look
Searched for similar pull requests
Followed the coding style (
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeDescribed the user-visible change below and left its changelog entry to the maintainer, keeping
docs/source/changelog/andCHANGELOG.mdout of the diff, if the change is user-visible: N/A — centralisedWhat 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 elseAlso tick if it regenerates constant or registry tables, members keeping their numeric values (the
constlabel)Description of your pull request and other information
Closes #3238.
Each site is classified against
rfc-conformance.rst:ProtocolErrorat its source (quiet under the fallback): TCP'smptcp_data_selector(flagless MP_JOIN, RFC 8684 §3.2) andmptcp_add_address_selector(ADD_ADDR length, §3.4.1); HIP's Length callbacks,locator_value_selector(RFC 8046 §4) and its fixed-width lists; IPv6-Route's Source Route address list (odd Hdr Ext Len, RFC 2460 §4.4). The remainder check these lists and SCTP's share moves to the newpcapkit.corekit.schema.entries.whole_entries.conformance.nonconforming: HOPOPT's and IPv6-Opts' SMF TaggerID TidLen (RFC 6621 §6.1.1), read on as TidLen + 1 octets, with NULL's TidLen now checked and rebuilt; MH's four closed enumerations, kept as anintbyMH._read_closed. Both honourPCAPKIT_MIMIC=wireshark(dissect_opt_smf_dpdandpacket-mip6.cread them silently), with rows in the mimic-mode table. A cut code is not reported.rfc-conformance.rstnames the helper. AFieldError,FieldValueErrororEnumValueErrorfrom a real bug at these sites stays loud, which each new test pins.Tests: the five new
*_3238_unit.pymodules fail on anorigin/developexport. Pins moved in the HIP, MH, IPv6-Ext, IPv6 option helper, option-area cut and MPTCP modules. The touched modules,tests/project,tests/protocols/*.pyandtests/*.pypass.