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

qtls: only attempt 0-RTT resumption for 0-RTT enabled session tickets #4183

Merged
merged 1 commit into from
Dec 9, 2023

Conversation

marten-seemann
Copy link
Member

@marten-seemann marten-seemann commented Nov 26, 2023

In specific, these lines would overwrite the EarlyData property from false to true, when doing session resumption using DialEarly (code from master):

var earlyData bool
// restore QUIC transport parameters and RTT stored in state.Extra
if extra := findExtraData(state.Extra); extra != nil {
earlyData = c.setData(extra)
}
state.EarlyData = earlyData

In addition to fixing that, we now also avoid saving the transport parameters into the session ticket for non-0-RTT tickets (code from this PR):

if earlyData {
// only save the transport parameters for 0-RTT enabled session tickets
return h.peerParams.MarshalForSessionTicket(b)
}
return b

Copy link

codecov bot commented Nov 26, 2023

Codecov Report

Attention: 17 lines in your changes are missing coverage. Please review.

Comparison is base (2d7ea37) 83.80% compared to head (dff19db) 83.87%.
Report is 5 commits behind head on master.

Files Patch % Lines
internal/qtls/go120.go 0.00% 9 Missing ⚠️
internal/handshake/crypto_setup.go 75.00% 5 Missing ⚠️
internal/qtls/client_session_cache.go 40.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4183      +/-   ##
==========================================
+ Coverage   83.80%   83.87%   +0.08%     
==========================================
  Files         150      150              
  Lines       15428    15532     +104     
==========================================
+ Hits        12928    13027      +99     
+ Misses       2003     1998       -5     
- Partials      497      507      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@sukunrt sukunrt left a comment

Choose a reason for hiding this comment

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

one minor comment.

internal/handshake/crypto_setup.go Outdated Show resolved Hide resolved
internal/handshake/crypto_setup.go Show resolved Hide resolved
@marten-seemann marten-seemann merged commit d234d62 into master Dec 9, 2023
34 checks passed
@marten-seemann marten-seemann deleted the fix-resumption branch December 14, 2023 06:28
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

2 participants