- 
                Notifications
    
You must be signed in to change notification settings  - Fork 86
 
Add RFC 9653 and fuzz tests #406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
          Codecov Report❌ Patch coverage is  
 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     
 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
  | 
    
b15ca4d    to
    37cb6e1      
    Compare
  
    | 
           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.  | 
    
37cb6e1    to
    a20338d      
    Compare
  
    | 
           I created #407 from this PR; that one is purely focused on making   | 
    
a20338d    to
    5444f07      
    Compare
  
    | 
           #407 has been merged so this PR is ready for review!  | 
    
5444f07    to
    e825ae6      
    Compare
  
    There was a problem hiding this 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.
079c015    to
    236bb04      
    Compare
  
    There was a problem hiding this 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.
236bb04    to
    9d097a8      
    Compare
  
    
Description
Requires #407 to be merged first.Merged!Reference issue
A part of #124. Closes #405.