Skip to content

Conversation

@philipch07
Copy link
Contributor

@philipch07 philipch07 commented Oct 18, 2025

Description

  • Adds support for RFC 9653.
  • Adds fuzz tests to validate the RFC 9653 core properties.

Requires #407 to be merged first. Merged!

Reference issue

A part of #124. Closes #405.

@codecov
Copy link

codecov bot commented Oct 18, 2025

Codecov Report

❌ Patch coverage is 94.23077% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.76%. Comparing base (a69c6a2) to head (9d097a8).

Files with missing lines Patch % Lines
chunk_init.go 93.93% 1 Missing and 1 partial ⚠️
param_zero_checksum.go 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #406      +/-   ##
==========================================
- Coverage   83.84%   83.76%   -0.09%     
==========================================
  Files          51       51              
  Lines        3448     3486      +38     
==========================================
+ Hits         2891     2920      +29     
- Misses        417      424       +7     
- Partials      140      142       +2     
Flag Coverage Δ
go 83.76% <94.23%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@philipch07 philipch07 force-pushed the pch07/upd-packet-9260-and-add-9653 branch 3 times, most recently from b15ca4d to 37cb6e1 Compare October 18, 2025 23:15
@Sean-Der
Copy link
Member

Amazing! I think we can get this merged tonight.

can you break this into singular PRs? Just so I can learn/understand since you are fixing my mistakes :)

it will make it easier for others to maintain/learn

@philipch07
Copy link
Contributor Author

Amazing! I think we can get this merged tonight.

can you break this into singular PRs? Just so I can learn/understand since you are fixing my mistakes :)

it will make it easier for others to maintain/learn

Yes, I can try! It may be a little difficult though since a lot of things got mixed together as I was working on it.

@philipch07 philipch07 changed the title Update packet to RFC 9260 and add RFC 9653 Add RFC 9653 and fuzz tests Oct 19, 2025
@philipch07 philipch07 marked this pull request as draft October 19, 2025 03:11
@philipch07 philipch07 force-pushed the pch07/upd-packet-9260-and-add-9653 branch from 37cb6e1 to a20338d Compare October 19, 2025 03:23
@philipch07
Copy link
Contributor Author

I created #407 from this PR; that one is purely focused on making packet.go conform to RFC 9260, along with some fuzz tests. This PR will have to be rebased after that one is merged, at which point the diffs will be cleaner. The resulting diffs should only be the RFC 9653 implementation along with some fuzz tests for it. Let me know if you think anything else can be broken down!

@philipch07 philipch07 force-pushed the pch07/upd-packet-9260-and-add-9653 branch from a20338d to 5444f07 Compare October 29, 2025 21:32
@philipch07
Copy link
Contributor Author

#407 has been merged so this PR is ready for review!

@philipch07 philipch07 marked this pull request as ready for review October 29, 2025 21:34
@philipch07 philipch07 force-pushed the pch07/upd-packet-9260-and-add-9653 branch from 5444f07 to e825ae6 Compare October 29, 2025 21:36
@JoeTurki JoeTurki requested a review from Copilot October 30, 2025 00:35
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements RFC 9653 Zero Checksum Acceptable (ZCA) extension for SCTP, allowing zero checksums when alternate error detection methods (like DTLS) are in use. The key changes ensure proper negotiation of ZCA parameters and enforce sender/receiver rules that restrict zero checksums for critical chunks like INIT and COOKIE-ECHO.

  • Adds ZCA parameter parsing/marshaling for INIT and INIT-ACK chunks with EDMID validation
  • Implements RFC 9653 sender rules: forces CRC32c for INIT/COOKIE-ECHO, allows zero checksum otherwise when negotiated
  • Updates packet marshal/unmarshal to handle ZCA-enabled paths with proper validation logic

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
param_zero_checksum.go Adds strict length validation (must be 8) for ZCA parameters per RFC 9653 section 4
param_zero_checksum_test.go Adds test cases for arbitrary EDMID round-trip and invalid length validation
packet_test.go Adds comprehensive tests and fuzz testing for RFC 9653 sender/receiver rules
chunk_init.go Implements ZCA parameter scanning, parsing, and marshaling for INIT chunks
chunk_init_ack.go Implements ZCA parameter handling for INIT-ACK chunks
chunk_init_test.go Adds tests to verify ZCA parameters don't get duplicated on re-marshal
chunk_init_common.go Adds constant for INIT fixed value length used in parameter parsing
chunk_cookie_echo.go Adds comment clarifying reserved flags behavior per RFC 9260
chunk_cookie_echo_test.go Adds test verifying COOKIE-ECHO forces CRC32c even with ZCA enabled
association.go Refactors checksum logic to delegate enforcement to packet.marshal()
association_test.go Updates existing tests to use strict mode (false) instead of ZCA mode

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@philipch07 philipch07 force-pushed the pch07/upd-packet-9260-and-add-9653 branch 2 times, most recently from 079c015 to 236bb04 Compare October 30, 2025 03:06
@JoeTurki JoeTurki requested a review from Copilot October 30, 2025 03:07
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@philipch07 philipch07 force-pushed the pch07/upd-packet-9260-and-add-9653 branch from 236bb04 to 9d097a8 Compare November 2, 2025 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Zero Checksum according to RFC 9653

3 participants