Update error_cause to RFC 9260 - #425
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #425 +/- ##
==========================================
- Coverage 89.47% 89.41% -0.06%
==========================================
Files 56 56
Lines 4770 4773 +3
==========================================
Hits 4268 4268
- Misses 502 505 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 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.
deb71f5 to
22bf9a2
Compare
22bf9a2 to
b9a3f48
Compare
|
simplified this from +307-22 change to +61-31 |
b9a3f48 to
ed09464
Compare
Description
error_cause.goto have updated errors according to RFC 9260Reference issue
Resolves #424.