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 issuing of connection IDs when dialing a 0-RTT connections #3058

Merged
merged 1 commit into from
Mar 9, 2021

Conversation

marten-seemann
Copy link
Member

Fixes #3057.

When dialing a 0-RTT connection, the client first restores the transport parameters from the original connection, and then applies the transport parameters provided by the server on the new connections.

@rip-create-your-account Do you think this fix is correct?

When dialing a 0-RTT connection, the client first restores the transport
parameters from the original connection, and then applies the transport
parameters provided by the server on the new connections.
@codecov
Copy link

codecov bot commented Mar 3, 2021

Codecov Report

Merging #3058 (10217a6) into master (2c45f2b) will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3058      +/-   ##
==========================================
+ Coverage   86.16%   86.17%   +0.01%     
==========================================
  Files         132      132              
  Lines        9355     9355              
==========================================
+ Hits         8060     8061       +1     
+ Misses        938      937       -1     
  Partials      357      357              
Impacted Files Coverage Δ
conn_id_generator.go 88.89% <ø> (ø)
internal/utils/rand.go 75.00% <0.00%> (+12.50%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2c45f2b...10217a6. Read the comment docs.

@rip-create-your-account
Copy link

What happens if the (*TransportParameters).ActiveConnectionIDLimit for the new connection is less than that of the 0-RTT params? (*TransportParameters).ValidFor0RTT doesn't check that field and I don't see server validating it elsewhere. So if the server were to reduce its ActiveConnectionIDLimit then same issue would occur as the client would issue CIDs according to the higher limit of the 0-RTT params. Should server reject 0-RTT in such case?

@marten-seemann
Copy link
Member Author

Good catch! That’s definitely an oversight, it’s even in the spec: https://www.ietf.org/archive/id/draft-ietf-quic-transport-34.html#name-values-of-transport-paramet

I’ll create a separate PR for that.

@rip-create-your-account
Copy link

In that case this PR looks like good to me

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.

Client issues too many CIDs when client resumes 0-RTT session and client set (*Config).ConnectionIDLength
3 participants