@@ -163,8 +163,8 @@ Connection:
163
163
164
164
Connection ID :
165
165
166
- : An opaque identifier that is used to identify a QUIC connection. Each
167
- endpoint sets a value that its peer includes in packets.
166
+ : An opaque identifier that is used to identify a QUIC connection at an
167
+ endpoint. Each endpoint sets a value that its peer includes in packets.
168
168
169
169
QUIC packet :
170
170
@@ -410,20 +410,20 @@ DCIL and SCIL:
410
410
octet. An encoded length of 0 indicates that the connection ID is also 0
411
411
octets in length. Non-zero encoded lengths are increased by 3 to get the full
412
412
length of the connection ID, producing a length between 4 and 18 octets
413
- inclusive. For example, an octet with the value 0x50 describes an 8 octet
414
- Destination Connection ID and a zero octet Source Connection ID.
413
+ inclusive. For example, an octet with the value 0x50 describes an 8- octet
414
+ Destination Connection ID and a zero-length Source Connection ID.
415
415
416
416
Destination Connection ID :
417
417
418
- : The Destination Connection ID field starts at octet 2 and is either 0 octets
419
- in length or between 4 and 18 octets. {{connection-id}} describes the use of
420
- this field in more detail.
418
+ : The Destination Connection ID field follows the connection ID lengths and is
419
+ either 0 octets in length or between 4 and 18 octets. {{connection-id}}
420
+ describes the use of this field in more detail.
421
421
422
422
Source Connection ID :
423
423
424
- : The Source Connection ID field starts at octet 2 and is either 0 octets in
425
- length or between 4 and 18 octets. {{connection-id}} describes the use of this
426
- field in more detail.
424
+ : The Source Connection ID field follows the Destination Connection ID and is
425
+ either 0 octets in length or between 4 and 18 octets. {{connection-id}}
426
+ describes the use of this field in more detail.
427
427
428
428
Version :
429
429
@@ -553,14 +553,6 @@ version-independent. The remaining fields are specific to the selected QUIC
553
553
version. See {{QUIC-INVARIANTS}} for details on how packets from different
554
554
versions of QUIC are interpreted.
555
555
556
- The short header omits the Connection ID Lengths, Source Connection ID,
557
- and Version fields that appear in the long header. The length of the
558
- Destination Connecton ID field is expected to be known to endpoints. Endpoints
559
- with a load balancer that uses the connection ID can agree to a fixed or minimum
560
- length for connection IDs with necessary information in the fixed portion.
561
- If that fixed portion instead encodes an explicit length, the entire connection
562
- ID can vary in length and still be used by the load balancer.
563
-
564
556
565
557
# # Version Negotiation Packet {#packet-version}
566
558
@@ -644,8 +636,14 @@ first cryptographic handshake message sent by the client.
644
636
645
637
If the client has not previously received a Retry packet from the server, it
646
638
populates the Destination Connection ID field with a randomly selected value.
647
- This MUST be at least 8 octets in length. If the client received a Retry packet
648
- and is sending a second Initial packet, then it uses the value from the Source
639
+ This MUST be at least 8 octets in length. Until a packet is received from the
640
+ server, the client MUST use the same random value unless it also changes the
641
+ Source Connection ID (which effectively starts a new connection attempt). The
642
+ randomized Destination Connection ID is used to determine packet protection
643
+ keys, but is not included in server packets.
644
+
645
+ If the client received a Retry packet and is sending a second Initial packet,
646
+ then it sets the Destination Connection ID to the value from the Source
649
647
Connection ID in the Retry packet.
650
648
651
649
The client populates the Source Connection ID field with a value of its choosing
@@ -779,32 +777,37 @@ Source Connection ID is used to set the Destination Connection ID used by a
779
777
peer.
780
778
781
779
During the handshake, packets with the long header are used to establish the
782
- Destination Connection ID that each endpoint uses. Each endpoint uses the
783
- Source Connection ID field to specify the connection ID that is used in the
784
- Destination Connection ID field of packets being sent to them. Upon receiving a
785
- packet, each endpoint sets the Destination Connection ID it sends to match the
786
- value of the Source Connection ID that they receive.
780
+ connection ID that each endpoint uses. Each endpoint uses the Source Connection
781
+ ID field to specify the connection ID that is used in the Destination Connection
782
+ ID field of packets being sent to them. Upon receiving a packet, each endpoint
783
+ sets the Destination Connection ID it sends to match the value of the Source
784
+ Connection ID that they receive.
787
785
788
786
During the handshake, an endpoint might receive multiple packets with the long
789
787
header, and thus be given multiple opportunities to update the Destination
790
788
Connection ID it sends. A client MUST only change the value it sends in the
791
- Destination Connection ID field in response to the first packet of each type
792
- (Retry, or Handshake) that it receives; a server MUST only change its value
793
- based on an Initial packet. This avoids problems that might arise from
794
- stateless processing of multiple Initial packets producing different connection
795
- IDs.
789
+ Destination Connection ID in response to the first packet of each type (Retry,
790
+ or Handshake) that it receives; a server MUST set its value based on the Initial
791
+ packet. If subsequent packets of those types include a different Source
792
+ Connection ID, they MUST be discarded. This avoids problems that might arise
793
+ from stateless processing of multiple Initial packets producing different
794
+ connection IDs.
796
795
797
796
Short headers only include the Destination Connection ID and omit the explicit
798
- length.
799
-
800
- The very first packet sent by a client client includes a random value for
801
- Destination Connection ID. The same value MUST be used for all 0-RTT packets
802
- sent on that connection ({{packet-protected}}). This randomized value is used
803
- to determine the handshake packet protection keys (see Section 5.2.2 of
804
- {{QUIC-TLS}}).
797
+ length. The length of the Destination Connecton ID field is expected to be
798
+ known to endpoints. Endpoints with a load balancer that uses a connection ID
799
+ can agree to a fixed or minimum length for connection IDs with necessary
800
+ information in the fixed portion. If that fixed portion instead encodes an
801
+ explicit length, the entire connection ID can vary in length and still be used
802
+ by the load balancer.
803
+
804
+ The very first packet sent by a client includes a random value for Destination
805
+ Connection ID. The same value MUST be used for all 0-RTT packets sent on that
806
+ connection ({{packet-protected}}). This randomized value is used to determine
807
+ the handshake packet protection keys (see Section 5.2.2 of {{QUIC-TLS}}).
805
808
806
809
A Version Negotiation ({{packet-version}}) packet MUST use both connection IDs
807
- selected by the client, inverted to ensure correct routing toward the client.
810
+ selected by the client, swapped to ensure correct routing toward the client.
808
811
809
812
810
813
# # Packet Numbers {#packet-numbers}
@@ -1911,19 +1914,19 @@ This design ensures that a stateless reset packet is - to the extent possible -
1911
1914
indistinguishable from a regular packet.
1912
1915
1913
1916
A server generates a random 18-octet Destination Connection ID field. For a
1914
- client that requires that the server include a connection ID, this will mean
1915
- that this value differs from previous packets with two consequences :
1917
+ client that depends on the server including a connection ID, this will mean that
1918
+ this value differs from previous packets. Ths results in two problems :
1916
1919
1917
1920
* The packet might not reach the client. If the Destination Connection ID is
1918
1921
critical for routing toward the client, then this packet could be incorrectly
1919
- routed and dropped. This causes the stateless reset to be ineffective in
1920
- causing errors to be quickly detected and recovered. In this case, clients
1921
- will need to rely on other methods such as timers to detect that the
1922
- connection has failed.
1922
+ routed. This causes the stateless reset to be ineffective in causing errors
1923
+ to be quickly detected and recovered. In this case, clients will need to rely
1924
+ on other methods - such as timers - to detect that the connection has failed.
1923
1925
1924
- * The connection ID can be used by entities other than the client to identify
1925
- this as a potential stateless reset. A server that occasionally uses
1926
- different connection IDs might introduce some uncertainty about this.
1926
+ * The randomly generated connection ID can be used by entities other than the
1927
+ client to identify this as a potential stateless reset. A server that
1928
+ occasionally uses different connection IDs might introduce some uncertainty
1929
+ about this.
1927
1930
1928
1931
The Packet Number field is set to a randomized value. The server SHOULD send a
1929
1932
packet with a short header and a type of 0x1F. This produces the shortest
@@ -2426,8 +2429,8 @@ Stateless Reset Token:
2426
2429
2427
2430
An endpoint MUST NOT send this frame if it currently requires that its peer send
2428
2431
packets with a zero-length Destination Connection ID. Changing the length of a
2429
- connection ID to or from zero-length makes it very difficult to identify when
2430
- the new connection ID was used . An endpoint that is sending packets with a a
2432
+ connection ID to or from zero-length makes it difficult to identify when the
2433
+ value of the connection ID changed . An endpoint that is sending packets with a
2431
2434
zero-length Destination Connection ID MUST treat receipt of a NEW_CONNECTION_ID
2432
2435
frame as a connection error of type PROTOCOL_VIOLATION.
2433
2436
0 commit comments