Subject: [quicwg/base-drafts] Where can you send CONNECTION_CLOSE (#2151)

From: ekr <[email-masked]>
Date: Thu, 13 Dec 2018 11:38:19 -0800

```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?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/2151

---

From: Martin Thomson <[email-masked]>
Date: Thu, 13 Dec 2018 15:58:35 -0800

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?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/2151#issuecomment-447164678

---

From: ekr <[email-masked]>
Date: Thu, 13 Dec 2018 16:30:27 -0800

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).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/2151#issuecomment-447170985

---

From: MikkelFJ <[email-masked]>
Date: Thu, 13 Dec 2018 16:35:17 -0800

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.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/2151#issuecomment-447171892

---

From: Martin Thomson <[email-masked]>
Date: Fri, 14 Dec 2018 01:01:49 +0000 (UTC)

I will await a PR then.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/2151#issuecomment-447176581