Fix SLI feedback type - #222
Merged
Merged
Conversation
`unmarshal()` in packet.go correctly uses `TypePayloadSpecificFeedback` for `SliceLossIndication` messages, but both the `Marshal` and `Unmarshal` for `SliceLossIndication` use `TypeTransportSpecificFeedback`. This makes it impossible to unmarshal a SLI message, as we will correctly only attempt to unmarshal when type is 206, but the unmarshal implementation in slice_loss_indication.go looks for type=205. RFC 4585 section 6.3.2 states that the packet type must be PSFB (defined as 206 in section 6.1). While SLI is no longer implemented in libwebrtc, when it was it was defined as having a packet type of PSFB (206).
Sean-Der
approved these changes
Aug 6, 2026
SLI Unmarshal was previously unreachable, but now panics on bad input. Fix the length check to avoid the panic.
Contributor
Author
|
Github Actions are still down so I ran fuzz tests locally and noticed after this PR that SLI packets could cause a panic. Updated the PR to fix the faulty length check. Previously this code was unreachable from |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #222 +/- ##
=======================================
Coverage 77.50% 77.50%
=======================================
Files 22 22
Lines 2032 2032
=======================================
Hits 1575 1575
+ Misses 360 359 -1
- Partials 97 98 +1
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:
|
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.
unmarshal()in packet.go correctly usesTypePayloadSpecificFeedbackforSliceLossIndicationmessages, but both theMarshalandUnmarshalforSliceLossIndicationuseTypeTransportSpecificFeedback. This makes it impossible to unmarshal a SLI message, as we will correctly only attempt to unmarshal when type is 206, but the unmarshal implementation in slice_loss_indication.go looks for type=205.RFC 4585 section 6.3.2 states that the packet type must be PSFB (defined as 206 in section 6.1). While SLI is no longer implemented in libwebrtc, when it was it was defined as having a packet type of PSFB (206).