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

Where can you send CONNECTION_CLOSE #2151

Closed
ekr opened this issue Dec 13, 2018 · 12 comments · Fixed by #2688
Closed

Where can you send CONNECTION_CLOSE #2151

ekr opened this issue Dec 13, 2018 · 12 comments · Fixed by #2688
Labels
-transport design An issue that affects the design of the protocol; resolution requires consensus. has-consensus An issue that the Chairs have determined has consensus, by canvassing the mailing list.

Comments

@ekr
Copy link
Collaborator

ekr commented Dec 13, 2018

If the connection has been successfully established, endpoints MUST send any
CONNECTION_CLOSE frames in a 1-RTT packet.  Prior to connection establishment a
peer might not have 1-RTT keys, so endpoints SHOULD send CONNECTION_CLOSE frames
in a Handshake packet.  If the endpoint does not have Handshake keys, or it is
not certain that the peer has Handshake keys, it MAY send CONNECTION_CLOSE
frames in an Initial packet.  If multiple packets are sent, they can be
coalesced (see {{packet-coalesce}}) to facilitate retransmission.

Isn't the rule here that you always send it in the highest level?

@martinthomson martinthomson added design An issue that affects the design of the protocol; resolution requires consensus. -transport labels Dec 13, 2018
@martinthomson
Copy link
Member

The intent is for the peer to be able to read the packet, thus the recommendation to use a lower level if you aren't sure that they have the right keys. If they have the right keys, then they will ignore the Initial packet, if they don't then it's better to signal the error than have them keep trying.

I think that this is OK. Do you have a specific concern with this design? Or the specific text?

@ekr
Copy link
Collaborator Author

ekr commented Dec 14, 2018

I'm not sure. It seems like there are two policies:

  • Always use level N until you are sure that the other side has level N+1
  • Always use the highest level.

I take you to be proposing the first of these, which, I believe, means "use the highest level where you have received packets from the peer in (or zero)". This text may say that, but all this stuff about certain is kind of hard to parse. Rather than making people reason it out, I think we should provide them with a clear rule (for instance the one above).

@mikkelfj
Copy link
Contributor

An endpoint could logically migrate to the next packet number space / encryption level for new transmissions while still keeping the previous level for retransmissions. If the connection dies before retransmission the peer might not be able to read latest crypto level even if this is where you normally send new data. It is easier and safer to send CLOSE on both channels rather than retransmitting the handshake history.

@martinthomson
Copy link
Member

I will await a PR then.

@huitema
Copy link
Contributor

huitema commented Jan 30, 2019

I had to fix a bug in which Picoquic was sending a connection close in handshake while the peer would not have the handshake key when receiving the message...
private-octopus/picoquic#485

@martinthomson
Copy link
Member

Tokyo conclusion: the principle here is that we want to use the highest level we know the peer to be able to read. Reassign to editorial to a) include this principle, and b) make the text clearer.

@martinthomson martinthomson added editorial An issue that does not affect the design of the protocol; does not require consensus. and removed design An issue that affects the design of the protocol; resolution requires consensus. labels Jan 30, 2019
@janaiyengar
Copy link
Contributor

@mnot @larseggert : This issue is marked editorial, but it's borderline design. The PR that fixes it (#2688) introduces 2119 language and behavior that is new. I'll remove the editorial tag, but I'm not marking it as design. Can you advise on what to do next?

@janaiyengar janaiyengar removed the editorial An issue that does not affect the design of the protocol; does not require consensus. label May 14, 2019
@mnot
Copy link
Member

mnot commented May 15, 2019

Will triage as design. Thanks.

@mnot mnot added the design An issue that affects the design of the protocol; resolution requires consensus. label May 15, 2019
@mnot
Copy link
Member

mnot commented Aug 6, 2019

@martinthomson ?

@mnot mnot reopened this Aug 6, 2019
@martinthomson
Copy link
Member

Yes? The proposal is to close with no action on the basis of text already incorporated in #2688.

@martinthomson martinthomson added the proposal-ready An issue which has a proposal that is believed to be ready for a consensus call. label Aug 7, 2019
@mnot
Copy link
Member

mnot commented Aug 7, 2019

There wasn't a consensus call. Will do one next round.

@mnot mnot added has-consensus An issue that the Chairs have determined has consensus, by canvassing the mailing list. and removed proposal-ready An issue which has a proposal that is believed to be ready for a consensus call. labels Aug 26, 2019
@martinthomson
Copy link
Member

Fixed by #2688.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-transport design An issue that affects the design of the protocol; resolution requires consensus. has-consensus An issue that the Chairs have determined has consensus, by canvassing the mailing list.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants