Repository navigation
Conversation
…ole SCTP layer fall back to Raw (#3215) - SCTP._read_chunk_data and _read_chunk_i_data refuse only a Length short of the chunk's fixed fields (16, 20), so a chunk with no user data parses with data=b'' (RFC 9260 6.2, 3.3.10.9; RFC 8260 2.1). - _make_chunk_data and _make_chunk_i_data still refuse empty user data given as keywords (RFC 9260 3.3.1), but rebuild a parsed chunk as received, so both round trips are byte-exact. - Tests: the no-user-data edge cases round-trip; the reader pins move to a Length short of the fixed fields.
Owner
Author
|
Good to go at
|
This branch has not been deployed
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.
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 #3215.
SCTP._read_chunk_dataand_read_chunk_i_datanow refuse only a Length short of the chunk's fixed fields (16, 20). A chunk with no user data keepsdata=b'': RFC 9260 §3.3.1 forbids sending one, but §6.2 has the receiver answer it with an ABORT carrying "No User Data" (§3.3.10.9), and RFC 8260 §2.1 has I-DATA's Length follow DATA's._make_chunk_dataand_make_chunk_i_datastill refuse empty user data given as keywords (the sender rule, §3.3.1), and rebuild a parsed chunk as received, as the I-DATA maker already keeps a parsed reserved field. So parse→rebuild and make→parse are byte-exact._sctp_fragmentsalready selects on them, so no toolkit change. Dropping the record would leave a TSN or FSN hole that no later chunk fills, so a message captured whole would be reported partial. The ABORT that §6.2 asks for acts on the association, which the reassembler does not model for any chunk. An unfragmented empty chunk (B and E both set) yields no record.sctp/data-no-user-dataleaves the edge suite'sREJECTEDand round-trips, with a new I-DATA twin. The reader pins intest_sctp_unit.py,test_sctp_extension_chunks_2811_unit.pyandtest_maker_invalid_format_messages_2296_unit.pymove to a Length short of the fixed fields.Tests:
tests/protocols/transport/test_sctp_empty_user_data_3215_unit.pyfails 16 of 22 on anorigin/developexport. Its passing case is the Length-boundary guard, which passes on purpose. SCTP coverage is unchanged at 93%, and the touched lines are covered.tests/project,tests/protocols/*.py,tests/*.py,tests/protocols/transport,tests/foundation/reassemblyandtests/toolkitpass, and so do the Sphinx-gatedtests/projectmodules underdocs/requirements.txt.