Repository navigation
fix(sctp): chunk flags, reserved fields and final padding round-trip - #1253
Merged
Merged
Conversation
- #1221: INIT, INIT ACK, SACK, HEARTBEAT, HEARTBEAT ACK, SHUTDOWN, SHUTDOWN ACK, ERROR, COOKIE ECHO and COOKIE ACK carry their raw flags octet (new `flags` data field and maker keyword); DATA and T-bit flags expose a `reserved` subfield; the Invalid Stream Identifier cause keeps its reserved field. - #1222: chunks with nested parameters or causes declare the RFC 9260 section 3.2 length, which excludes the final item's padding; a parsed chunk whose length counts that padding keeps it. - test_sctp_unit pinned the old padded lengths (INIT ACK 32, ABORT 12); updated to 29 and 11.
Contributor
|
Coverage: 88.89% (unit tier, Python 3.14,
Per-file detail: the |
Owner
Author
|
Cross-review verdict on
|
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) — ranmypyandpylintdirectly on the three SCTP files: they report nothing new on changed lines. I did not run themaketargets.make testpasses, and a test case covers the change — only the modules listed belowdocs/source/changelog/and regeneratedCHANGELOG.md, if the change is user-visible — N/A, added centrallyWhat is the purpose of your pull request?
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 elseDescription of your pull request and other information
Closes #1221
Closes #1222
flagsfield, and their makers gain aflagskeyword: INIT, INIT ACK, SACK, HEARTBEAT, HEARTBEAT ACK, SHUTDOWN, SHUTDOWN ACK, ERROR, COOKIE ECHO and COOKIE ACK.DATAChunkFlagsandTBitFlagsgain areservedsubfield.InvalidStreamIdentifierCausegainsreserved.make()output changes for an unpadded final parameter: for example, an ABORT withbyeis now 11 bytes, not 12.test_sctp_unit.pypinned the old lengths (INIT ACK 32, ABORT 12) and is updated.Probe. Each input is rebuilt with
SCTP.from_data(SCTP(raw).info).01a50014→01000014;0100001b→0100001c.f3, ABORTfeand causebeefcases.examples/captures/*round-trip.Tests. The new
test_sctp_roundtrip_unit.pyfails without the fix (20 failed, 5 passed) and passes with it (7 passed, 18 subtests). Results of the other runs:test_sctp_unit37 passedtest_transport_unit11 passedtest_ngap_unit23 passedtest_option_roundtrip_unit6 passedtests/project389 passed, 1 skippedrun_unittest_leg.py protocols --exclude protocols/internet: 857 tests, 0 failures