Commit Graph

323 Commits

Author SHA1 Message Date
Marten Seemann
1e874896cd wire: improve logging of connection ID retirements (#4241) 2024-01-10 21:53:25 -08:00
Marten Seemann
8cad3d2ea5 wire: use netip.AddrPort to encode the IPs in the Preferred Address (#4232) 2024-01-02 21:56:25 -08:00
Marten Seemann
22411e16d5 utils: switch to standard library min and max functions (#4218)
These functions were added in Go 1.21.
2023-12-27 21:19:13 -08:00
Marten Seemann
6ffb9054a2 fuzzing: add frame validation logic (#4206) 2023-12-13 23:09:02 -08:00
chungthuang
7b9d21fbe6 send large max_datagram_frame size, introduce a DatagramTooLargeError error (#4143)
The size can be overwritten to a lower value for testing.
2023-12-02 06:27:15 -08:00
Marten Seemann
2d7ea37672 wire: reject NEW_CONNECTION_ID frames with zero-length conneciton IDs (#4180) 2023-11-23 02:41:12 -08:00
Marten Seemann
ced65c0ddc wire: always set the QUIC bit for Version Negotiation packets (#3991)
* wire: always set the QUIC bit for Version Negotiation packets

* Update internal/wire/version_negotiation_test.go
2023-08-20 19:55:57 -07:00
Marten Seemann
fe3c4f271d add a method to retrieve non-QUIC packets from the Transport (#3992) 2023-08-19 01:19:17 -07:00
Ameagari
6880f88089 save the max_datagram_frame_size transport parameter in the session ticket (#4013)
* Add MaxDatagramFrameSize parameter in session ticket

* fix gofumpt issues

* Update integrationtests/self/zero_rtt_test.go

Co-authored-by: Marten Seemann <martenseemann@gmail.com>

* fix: correct comparsion of max_datagram_frame_size

* test: use constant MaxDatagramFrameSize for session ticket test

* fix grammar

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-08-18 19:16:16 -07:00
Ameagari
1c47ebefc0 check transport parameters after 0-RTT resumption (#3985)
* check new transport parameters do not contain redueced limits

* redefine ValidForUpdate and add tests

* fix test assertion and update comment
2023-08-01 18:34:42 -07:00
Marten Seemann
0662afba63 stop using math/rand.Seed and Read in tests, bump go.mod version to 1.20 (#3936) 2023-07-01 11:29:41 -07:00
Marten Seemann
21388c86bb drop support for draft-29 (#3903) 2023-06-21 04:06:44 -07:00
Marten Seemann
28d5106a1c wire: switch to crypto/rand for greased transport parameter generation (#3904) 2023-06-20 09:31:12 -07:00
Marten Seemann
7ea6dc991f use the same ACK frame struct in the send path, remove ACK frame pool (#3831) 2023-06-02 08:34:27 -07:00
Marten Seemann
a595d34557 use a single ACK frame in the receive path 2023-06-02 17:21:46 +03:00
Marten Seemann
fce0261c34 wire: apply the default value for the active_connection_id_limit (#3806) 2023-05-28 11:45:46 -07:00
Marten Seemann
378e3c8b74 wire: save ECN counts on the ACK frame (#3829) 2023-05-28 16:36:38 +03:00
Sukun
cb3453db25 fix comment claiming ParseConnectionID reuses the data slice (#3848) 2023-05-21 07:54:50 -07:00
Marten Seemann
a519d827d1 wire: use a dedicated rand.Rand for greasing transport parameters (#3758)
rand.Seed is deprecated since Go 1.20. This change also reduces
(potential) lock contention when obtaining random numbers / bytes.
2023-04-19 06:21:25 -07:00
Marten Seemann
f36690ae9c protocol: remove VersionWhatever, previously used for testing (#3763) 2023-04-19 06:19:27 -07:00
Marten Seemann
969b5dc131 add a handshake test for post-quantum-size ClientHellos (#3759)
Post-quantum ClientHellos typically are larger than 1 MTU and will
therefore need to be split across multiple packets.
2023-04-19 06:01:43 -07:00
Marten Seemann
7a393315bd wire: use constants for frame types (#3739) 2023-04-19 05:58:31 -07:00
Marten Seemann
eb05964942 wire: speed up identification of 0-RTT packets (#3761) 2023-04-19 05:50:57 -07:00
Marten Seemann
da26f91905 wire: correctly parse multi-byte frame types (#3736) 2023-04-19 05:42:23 -07:00
Marten Seemann
04c3fd0756 deprecate quicvarint.Write in favor of quicvarint.Append (#3690) 2023-02-13 02:52:25 -08:00
Marten Seemann
3d9380ec3c reject invalid active_connection_id_limit transport parameter values (#3687) 2023-02-01 17:03:19 -08:00
Marten Seemann
58cedf7a4f rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
Marten Seemann
ef28f4667f refactor frame parser to remove version parameter from constructor 2023-01-18 20:51:58 +13:00
Marten Seemann
c24fbb094c refactor header writing to append to a byte slice (#3646)
This avoids having to allocate a bytes.Buffer.
2023-01-17 01:56:06 -08:00
Marten Seemann
86edf7fd4b remove the LongHeader field from the wire.Header 2023-01-17 21:53:39 +13:00
Marten Seemann
aca052dc7c stop using the ExtendedHeader for parsing short header packets in tests 2023-01-17 21:53:39 +13:00
Marten Seemann
e89fc1152b stop using the ExtendedHeader for writing short header packets in tests 2023-01-17 21:53:39 +13:00
Marten Seemann
124e597cf9 add a function to write short headers 2023-01-17 21:53:39 +13:00
Marten Seemann
4bf50901e8 add a function to determine the length of a short header 2023-01-17 21:53:39 +13:00
Marten Seemann
870fbe7ab0 migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
Marten Seemann
63764c429c use a sync.Pool for ACK frames 2022-09-06 14:41:13 +03:00
Marten Seemann
dfd35cb071 use a single bytes.Reader for frame parsing (#3536) 2022-09-01 01:06:50 -07:00
Marten Seemann
656f3d2d7d remove the wire.ShortHeader in favor of more return values (#3535) 2022-08-30 04:37:36 -07:00
Marten Seemann
0b26365dae Merge pull request #3534 from lucas-clemente/header-parsing
introduce a separate code paths for Short Header packet handling
2022-08-30 14:09:38 +03:00
Marten Seemann
31995601a9 return an error when parsing a too long connection ID from a header (#3533) 2022-08-30 04:08:41 -07:00
Marten Seemann
7023b52e13 speed up marshaling of transport parameters (#3531)
The speedup comes from multiple sources:
1. We now preallocate a byte slice, instead of appending multiple times.
2. Marshaling into a byte slice is faster than using a bytes.Buffer.
3. quicvarint.Write allocates, while quicvarint.Append doesn't.
2022-08-29 23:05:52 +03:00
Marten Seemann
3a12a898a5 add a wire.ShortHeader, implement short header parsing
The new parsing function is vastly faster than the combination of header
and extended header parsing:

BenchmarkShortHeaderParsing-10          44192314                26.79 ns/op           48 B/op          1 allocs/op
BenchmarkShortHeaderParsingOld-10       12627363                99.99 ns/op          228 B/op          3 allocs/op
2022-08-29 15:06:34 +03:00
Marten Seemann
f41772c43c return an error when parsing a too long connection ID from a header 2022-08-29 13:05:24 +03:00
Marten Seemann
1aced95d41 use an array instead of a byte slice for Connection IDs 2022-08-29 11:30:31 +03:00
Marten Seemann
9e0f9e62ff parse arbitrary length Connection IDs in Version Negotiation packets 2022-08-29 10:58:33 +03:00
Marten Seemann
21b9ef03be add a type for arbitrary length Connection IDs, and parsing function
RFC 8999 allows Connection IDs of up to 255 bytes. Current QUIC versions
only use up to 20 bytes.
2022-08-29 10:58:33 +03:00
Marten Seemann
d7097d74f0 implement a function to parse the version number of a Long Header packet 2022-08-29 10:58:33 +03:00
Marten Seemann
ab6d664b43 rename frame.Write to frame.Append 2022-08-28 23:18:24 +03:00
Marten Seemann
3ca1001951 append to a byte slice instead of a bytes.Buffer when serializing frames 2022-08-28 23:18:06 +03:00
Marten Seemann
bea5de0221 Merge pull request #3483 from lucas-clemente/generic-min-max
use generic Min and Max functions
2022-08-12 12:09:30 +04:00