Skip to content
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

Fix maximum packet count handling #222

Merged
merged 1 commit into from
Jan 4, 2023
Merged

Conversation

at-wat
Copy link
Member

@at-wat at-wat commented Dec 21, 2022

Accoring to RFC3711 section 9.2, SRTP/SRTCP session must not wrap SRTP ROC and SRTCP index without changing the master key.

ref: https://www.rfc-editor.org/rfc/rfc3711#section-9.2

@at-wat at-wat self-assigned this Dec 21, 2022
@codecov
Copy link

codecov bot commented Dec 21, 2022

Codecov Report

Base: 76.31% // Head: 76.56% // Increases project coverage by +0.24% 🎉

Coverage data is based on head (66c2660) compared to base (a33fda5).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #222      +/-   ##
==========================================
+ Coverage   76.31%   76.56%   +0.24%     
==========================================
  Files          17       17              
  Lines        1220     1233      +13     
==========================================
+ Hits          931      944      +13     
  Misses        198      198              
  Partials       91       91              
Flag Coverage Δ
go 76.56% <100.00%> (+0.24%) ⬆️
wasm 76.07% <100.00%> (+0.25%) ⬆️

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

Impacted Files Coverage Δ
errors.go 100.00% <ø> (ø)
context.go 88.52% <100.00%> (ø)
option.go 100.00% <100.00%> (ø)
srtcp.go 85.48% <100.00%> (+1.00%) ⬆️
srtp.go 89.28% <100.00%> (+2.05%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Accoring to RFC3711 section 9.2, SRTP/SRTCP session must not
wrap SRTP ROC and SRTCP index without changing the master key.

Also fix Context.SetROC() with ROC>0xffff.
s.index = uint64(roc<<16) | (s.index & (seqNumMax - 1))
s.index = uint64(roc)<<16 | (s.index & (seqNumMax - 1))
Copy link
Member Author

Choose a reason for hiding this comment

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

Fix SetROC() with roc>0xffff

@at-wat
Copy link
Member Author

at-wat commented Jan 4, 2023

Going to merge this but feel free to add comments later

@at-wat at-wat merged commit 5ce39f6 into master Jan 4, 2023
@at-wat at-wat deleted the fix-max-packet-handling branch January 4, 2023 04:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant