Skip to content

Conversation

@oto313
Copy link
Contributor

@oto313 oto313 commented Mar 17, 2025

Pion incorrectly resets the consent timer when sending any traffic.
The consent timer must only be reset on STUN traffic.

RFC 7675

Consent expires after 30 seconds. That is, if a valid STUN binding
response has not been received from the remote peer's transport
address in 30 seconds, the endpoint MUST cease transmission on that
5-tuple. STUN consent responses received after consent expiry do not
re-establish consent and may be discarded or cause an ICMP error.

@Sean-Der
Copy link
Member

Thank you so much @oto313!

Would it be possible to make a small test out of this? My fear is that this will break again in the future :(

If it isn't easy we can merge now, and add a ticket. Better to have it fixed then block for a test.

thank you!

@oto313
Copy link
Contributor Author

oto313 commented Mar 17, 2025

Sure @Sean-Der. Take a look if the test is enough. It fails when this patch is not merged and passes when it is merged.

Thanks

@codecov
Copy link

codecov bot commented Mar 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.82%. Comparing base (f92d05f) to head (3d7d2aa).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #767      +/-   ##
==========================================
+ Coverage   78.55%   78.82%   +0.26%     
==========================================
  Files          41       41              
  Lines        5437     5435       -2     
==========================================
+ Hits         4271     4284      +13     
+ Misses        933      921      -12     
+ Partials      233      230       -3     
Flag Coverage Δ
go 78.82% <100.00%> (+0.26%) ⬆️
wasm 27.08% <0.00%> (+<0.01%) ⬆️

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

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

@Sean-Der Sean-Der changed the title Sending keepalive always as stated in RFC 7675 Always send KeepAlives Mar 17, 2025
@Sean-Der Sean-Der merged commit 37fb5d2 into pion:master Mar 17, 2025
14 checks passed
@Sean-Der
Copy link
Member

@oto313 Thank you! Tagged as v4.0.8

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.

2 participants