Skip to content

Commit 2764c5c

Browse files
committed
Reducing minimum connection ID length to 4 octets
1 parent 436786f commit 2764c5c

File tree

2 files changed

+25
-24
lines changed

2 files changed

+25
-24
lines changed

draft-ietf-quic-invariants.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ version-specific semantics are marked with an X.
138138
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
139139
|1|X X X X X X X|DCIL(4)|SCIL(4)|
140140
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
141-
| Destination Connection ID (0/64..176) ...
141+
| Destination Connection ID (0/32..148) ...
142142
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
143-
| Source Connection ID (0/64..176) ...
143+
| Source Connection ID (0/32..148) ...
144144
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
145145
| Version (32) |
146146
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -157,10 +157,11 @@ The next octet contains the length in octets of the two Connection IDs (see
157157
integer. The length of the Destination Connection ID (DCIL) occupies the high
158158
bits of the octet and the length of the Source Connection ID (SCIL) occupying
159159
the low bits of the octet. An encoded length of 0 indicates that the connection
160-
ID is also 0 octets in length. Non-zero encoded lengths are increased by 7 to
161-
get the full length of the connection ID. For example, an octet with the value
162-
0xa0 describes a 17 octet Destination Connection ID and a zero octet Source
163-
Connection ID.
160+
ID is also 0 octets in length. Non-zero encoded lengths are increased by 3 to
161+
get the full length of the connection ID; the final value is therefore either 0
162+
or between 4 and 18 octets in length (inclusive). For example, an octet with
163+
the value 0xe0 describes a 17 octet Destination Connection ID and a zero octet
164+
Source Connection ID.
164165

165166
The connection ID lengths are followed by a two connection IDs. The connection
166167
ID associated with the recipient of the packet (the Destination Connection ID)
@@ -182,7 +183,7 @@ version-specific semantics are marked with an X.
182183
+-+-+-+-+-+-+-+-+
183184
|0|X X X X X X X|
184185
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
185-
| Destination Connection ID (0..176) ...
186+
| Destination Connection ID (0..148) ...
186187
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
187188
|X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X ...
188189
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -201,7 +202,7 @@ The remainder of the packet has version-specific semantics.
201202
## Connection ID
202203

203204
A connection ID is an opaque field. A connection ID can be 0 octets in length,
204-
or between 8 and 22 octets (inclusive).
205+
or between 4 and 18 octets (inclusive).
205206

206207
The primary function of a connection ID is to ensure that changes in addressing
207208
at lower protocol layers (UDP, IP, and below) don't cause packets for a QUIC
@@ -243,9 +244,9 @@ Version field, which is set to 0x00000000.
243244
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
244245
|1|X X X X X X X|DCIL(4)|SCIL(4)|
245246
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
246-
| Destination Connection ID (0/64..176) ...
247+
| Destination Connection ID (0/32..148) ...
247248
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
248-
| Source Connection ID (0/64..176) ...
249+
| Source Connection ID (0/32..148) ...
249250
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
250251
| Version (32) = 0 |
251252
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

draft-ietf-quic-transport.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -370,9 +370,9 @@ keys are established.
370370
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
371371
|1| Type (7) |DCIL(4)|SCIL(4)|
372372
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
373-
| Destination Connection ID (0/64..176) ...
373+
| Destination Connection ID (0/32..148) ...
374374
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
375-
| Source Connection ID (0/64..176) ...
375+
| Source Connection ID (0/32..148) ...
376376
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
377377
| Version (32) |
378378
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -408,21 +408,21 @@ DCIL and SCIL:
408408
Connection ID Length (DCIL) field occupies the 4 high bits of the octet and
409409
the Source Connection ID Length (SCIL) field occupies the 4 low bits of the
410410
octet. An encoded length of 0 indicates that the connection ID is also 0
411-
octets in length. Non-zero encoded lengths are increased by 7 to get the full
412-
length of the connection ID, producing a length between 8 and 22 octets
413-
inclusive. For example, an octet with the value 0xa0 describes a 17 octet
411+
octets in length. Non-zero encoded lengths are increased by 3 to get the full
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
414414
Destination Connection ID and a zero octet Source Connection ID.
415415

416416
Destination Connection ID:
417417

418418
: The Destination Connection ID field starts at octet 2 and is either 0 octets
419-
in length or between 8 and 22 octets. {{connection-id}} describes the use of
419+
in length or between 4 and 18 octets. {{connection-id}} describes the use of
420420
this field in more detail.
421421

422422
Source Connection ID:
423423

424424
: The Source Connection ID field starts at octet 2 and is either 0 octets in
425-
length or between 8 and 22 octets. {{connection-id}} describes the use of this
425+
length or between 4 and 18 octets. {{connection-id}} describes the use of this
426426
field in more detail.
427427

428428
Version:
@@ -469,7 +469,7 @@ following sections.
469469
+-+-+-+-+-+-+-+-+
470470
|0|K|1|1|0|T T T|
471471
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
472-
| Destination Connection ID (0..176) ...
472+
| Destination Connection ID (0..148) ...
473473
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
474474
| Packet Number (8/16/32) ...
475475
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -572,9 +572,9 @@ The layout of a Version Negotiation packet is:
572572
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
573573
|1| Unused (7) |DCIL(4)|SCIL(4)|
574574
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
575-
| Destination Connection ID (0/64..176) ...
575+
| Destination Connection ID (0/32..148) ...
576576
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
577-
| Source Connection ID (0/64..176) ...
577+
| Source Connection ID (0/32..148) ...
578578
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
579579
| Version (32) |
580580
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -1883,7 +1883,7 @@ following layout:
18831883
+-+-+-+-+-+-+-+-+
18841884
|0|K| Type (6) |
18851885
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1886-
| Destination Connection ID (176) ...
1886+
| Destination Connection ID (148) ...
18871887
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
18881888
| Packet Number (8/16/32) |
18891889
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -1902,7 +1902,7 @@ following layout:
19021902
This design ensures that a stateless reset packet is - to the extent possible -
19031903
indistinguishable from a regular packet.
19041904

1905-
A server generates a random 22-octet Destination Connection ID field. For a
1905+
A server generates a random 18-octet Destination Connection ID field. For a
19061906
client that requires that the server include a connection ID, this will mean
19071907
that this value differs from previous packets with two consequences:
19081908

@@ -2379,7 +2379,7 @@ The NEW_CONNECTION_ID is as follows:
23792379
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
23802380
| Sequence (i) ...
23812381
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2382-
| Length (8) | Connection ID (0,64..176) ...
2382+
| Length (8) | Connection ID (32..148) ...
23832383
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
23842384
| |
23852385
+ +
@@ -2404,7 +2404,7 @@ Sequence:
24042404
Length:
24052405

24062406
: An 8-bit unsigned integer containing the length of the connection ID. Values
2407-
less than 8 and greater than 22 are invalid and MUST be treated as a
2407+
less than 4 and greater than 18 are invalid and MUST be treated as a
24082408
connection error of type PROTOCOL_VIOLATION.
24092409

24102410
Connection ID:

0 commit comments

Comments
 (0)