Update error_cause to RFC 9260 - #425
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #425 +/- ##
==========================================
+ Coverage 83.84% 84.57% +0.72%
==========================================
Files 51 51
Lines 3448 3455 +7
==========================================
+ Hits 2891 2922 +31
+ Misses 417 394 -23
+ Partials 140 139 -1
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:
|
There was a problem hiding this comment.
Pull Request Overview
This PR enhances error cause handling in the SCTP implementation by adding validation for error cause lengths and improving code consistency. The changes ensure that error causes comply with RFC 9260 specifications regarding the 16-bit length field constraints.
- Adds length validation to prevent oversized error cause values that would overflow the 16-bit length field
- Refactors error handling to use inline variable declarations for cleaner code
- Updates documentation and error messages for clarity and RFC 9260 compliance
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| error_cause.go | Adds pre-validation in buildErrorCause(), introduces new error constants, updates error messages, and fixes String() method capitalization |
| error_cause_header.go | Adds length validation in marshal(), adds input validation in unmarshal(), improves inline comments, and defines maxErrorCauseValueLen constant |
| error_cause_user_initiated_abort.go | Adds length validation in marshal() using new constant, refactors unmarshal error handling, fixes comment spacing |
| error_cause_protocol_violation.go | Adds length validation in marshal() using new constant, refactors unmarshal error handling, updates documentation formatting |
| error_cause_unrecognized_chunk_type.go | Refactors unmarshal error handling to inline variable declaration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
237602d to
deb71f5
Compare
deb71f5 to
22bf9a2
Compare
Description
error_cause.goto have updated errors according to RFC 9260Reference issue
Resolves #424.