Skip to content

Fix SLI feedback type - #222

Merged
kcaffrey merged 2 commits into
pion:mainfrom
kcaffrey:fix-sli
Aug 7, 2026
Merged

Fix SLI feedback type#222
kcaffrey merged 2 commits into
pion:mainfrom
kcaffrey:fix-sli

Conversation

@kcaffrey

@kcaffrey kcaffrey commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

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).

`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).
@JoTurk
JoTurk requested a lite review from Copilot August 6, 2026 18:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

SLI Unmarshal was previously unreachable, but now panics on bad input.
Fix the length check to avoid the panic.
@kcaffrey

kcaffrey commented Aug 6, 2026

Copy link
Copy Markdown
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 rtcp.Unmarshal(), but now it is reachable after this PR.

@codecov

codecov Bot commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.50%. Comparing base (2057dab) to head (b65b272).

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     
Flag Coverage Δ
go 77.50% <100.00%> (ø)

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

☔ View full report in Codecov by Harness.
📢 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.

@kcaffrey
kcaffrey merged commit e636223 into pion:main Aug 7, 2026
26 of 27 checks passed
@kcaffrey
kcaffrey deleted the fix-sli branch August 7, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants