Repository navigation
feat(application): dissect every whole DTLS record in a datagram - #2603
Conversation
|
GOOD TO GO at |
|
Coverage: 94.03% (unit tier, Python 3.15,
Per-file detail: the |
|
resolve conflicts |
8dc5f7e to
61ef6cf
Compare
|
Rebased onto
|
…2535) - DTLS._import_next_layer dissects a whole record after the first as a further DTLS layer, the previous record's payload, under beholder in DTLS._import_next_record; a record that fails to decode becomes Raw with everything after it. - _opens_whole_record checks the header only: legacy content type, 0xFExx version and length; a unified header with no connection ID and a length that fits, or no length at all, which runs to the end of the datagram. - protocol='DTLS', layer='Application' and FRAME_LAYER_LIMIT stop the chain. - dtls.py and dtls.rst gain a "Records in One Datagram" section. - Tests: two- and three-record datagrams, unified-header chaining, malformed later records, the stop conditions, and round trips both ways.
The Chained Records ruling on protocol-family-grouping.rst named DTLS as not chaining; DTLS records sharing a datagram are now chained layers too.
|
GOOD TO GO at
|
61ef6cf to
1b42427
Compare
|
Rebased onto
|
…6.0 (#2449) - Folded into the TLS/DTLS entry: the hello and EncryptedExtensions extension lists, their registered body decoders, register_tls_extension and the pcapkit.const.tls extension types (#2595), and each whole DTLS record in a datagram as a further layer (#2603). - The conventions entry records #2611's per-test purge rule; the member-order entry cites #2491. - No entry for #2595's private ProtocolBase value helpers, as for the other private API. - CHANGELOG.md regenerated; util/changelog_md.py --check passes.
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
feat— adds a featureDescription of your pull request and other information
DTLS now dissects every whole record in a UDP datagram, chained the way #2517 does it for TLS. Each record after the first is the previous record's payload.
Rawwith the rest of the datagram and the error set (ruling A). Octets that open no whole record stayRawwith no error.protocol='DTLS',layer='Application'andFRAME_LAYER_LIMITstop the chain.Llength. A header withoutLruns to the end of the datagram and ends the chain. A header with theCbit set staysRawwhen it comes later, since its end cannot be found.Settled on the worker's recommendations, open to the owner:
Rawsilently, as in TLS;SSL.Follow-up once #2531 lands: the toolkit's
_dtls_fragmentsreads only the first DTLS layer, so a fragmented handshake in a later record is dissected but not reassembled.Closes #2535