Commit 1bb09e6
committed
quic: pass the connection ID length into 1-RTT packet parsing
1-RTT packets contain a variable-length connection ID field, but
no indication of the length of the connection ID. The recipient
of the packet has chosen the connection ID, and is expected to
either choose a consistent length or encode the length in the
connection ID.
Change the parse1RTTPacket function to take the connection ID
length as an input, rather than assuming that all 1-RTT packets
contain our hardcoded connection ID length.
This permits using parse1RTTPacket in tests which may create
and parse packets using other lengths.
For golang/go#58547
Change-Id: I9d09e4a0041051be1604c9146f6db9ca959ad696
Reviewed-on: https://go-review.googlesource.com/c/net/+/504856
Run-TryBot: Damien Neil <dneil@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>1 parent 952fc9c commit 1bb09e6
2 files changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
| 188 | + | |
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| |||
0 commit comments