Repository navigation
refactor(analysis): DTLS's foundation analysis wraps a DTLS protocol method - #2634
Merged
Merged
Conversation
…2622) - DTLS.analyze_handshake(header, body), after read_handshake, takes over the analysis module's private decoder: rebuild the message unfragmented, read it, keep a body that does not decode raw. That refusal is quiet (CaughtByCaller), where it logged at CRITICAL and installed the hooks. - dtls_handshake calls it, and the reassembly Deferred binds __protocol_type__'s, as IP and TCP do; one without it fails on completion. - reassembly-integration.rst records the ruling; protocol-family-grouping.rst counts the explicit CaughtByCaller under #2588's rule. - Tests pin the delegation, a subclass override, pickling, the quiet fallback, and that protocols import only registry.protocols from foundation. Closes #2622.
Owner
Author
|
GOOD TO GO at
|
JarryShaw
added a commit
that referenced
this pull request
Nov 2, 2026
…types and the registry split into 1.6.0 (#2449) - Breaking: Quick-Start values their fields cannot carry raise, reversing 1.5.0's round-down of a TCP rate under 80 kbps (#2630). - Folded into unreleased entries: tls12_cid records and DTLSContext (#2631), LinkType 105 and 127 in Frame and PCAP-NG (#2632), and DTLS.analyze_handshake behind dtls_handshake and packet (#2634). - Changed: foundation.registry.protocols split into per-layer submodules (#2635); 1.6.0's register_* roles and 1.5.0's three register_protocol* roles point at their submodules, 1.5.0's text unchanged. - The conventions entry records the per-layer wrapper placement (#2635) and parse ownership (#2634). No entry for #2629, which changes no released behaviour. - 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
As the owner ruled on #2622,
pcapkit.foundation.analysisis a public layer over protocol methods and holds no parsing of its own. DTLS now matches IP and TCP:foundation.analysis.dtls._read_handshakemoves into the classmethodDTLS.analyze_handshake.dtls_handshakeand the reassemblyDeferredboth call that classmethod, theDeferredthrough the engine's__protocol_type__.pcapkit.foundationunderpcapkit/protocols/outsideTYPE_CHECKING, exceptregistry.protocols.Output is unchanged: 68 test-vector datagrams, 40 synthetic vectors and every sample capture match, including pickle round trips. One fix comes with the move. On
main, an undecodable handshake body logged CRITICAL and replacedsys.excepthook/threading.excepthook. It is now a quiet refusal, per #2588's rule.A custom engine's
__protocol_type__now decides the DTLS parse, as it does for IP and TCP, and must defineanalyze_handshake.foundation.analysisis in no release. A Sonnet cross-review reproduced the differential and the guard mutations; its fixes are folded in.Closes #2622