Commit Graph

6635 Commits

Author SHA1 Message Date
Marten Seemann
2d2538d790 ackhandler: remove unneeded SetHandshakeConfirmed from SentPacketHandler (#4890)
According to section 4.9.2 of RFC 9001, dropping the Handshake packet
number spaces happens when the handshake is confirmed.
2025-01-20 12:59:27 +08:00
Marten Seemann
92dc1970ec ackhandler: avoid calling time.Now() when generating ACK frame (#4886) 2025-01-18 17:16:30 +08:00
Marten Seemann
29f98a296c ackhandler: avoid calling time.Now() when setting loss detection timer (#4885) 2025-01-18 15:40:30 +08:00
Marten Seemann
ceabb6bd9a http3: fix flaky TestTransportConnectionRedial (#4884) 2025-01-18 13:14:44 +08:00
Marten Seemann
0fd2decbd5 http3: rename singleRoundTripper interface to clientConn (#4875)
No functional change expected.
2025-01-16 14:37:00 +08:00
Marten Seemann
c017def433 http3: fix connection re-dialing logic for non-QUIC errors (#4879) 2025-01-16 14:13:46 +08:00
Marten Seemann
259fd92306 http3: migrate the error tests away from Ginkgo (#4876) 2025-01-16 13:20:43 +08:00
Marten Seemann
150b955d06 reject NEW_CONNECTION_ID frames when using zero-length connection IDs (#4878) 2025-01-16 11:30:08 +08:00
Marten Seemann
a2dccf54ca http3: fix errors.Is for the Error (#4877) 2025-01-15 20:28:11 +08:00
Marten Seemann
155f8a3725 http3: migrate the transport tests away from Ginkgo (#4857) 2025-01-15 19:59:58 +08:00
Marten Seemann
19ab2c3985 http3: close http.Request.Body on all non-nil error code paths (#4874) 2025-01-15 14:52:15 +08:00
Marten Seemann
62a94758e6 move dialing logic from the client into the Transport (#4859) 2025-01-14 16:40:20 +08:00
Marten Seemann
fbbc3c9e30 wait for connection to shut down when the Dial context is cancelled (#4872) 2025-01-14 16:01:57 +08:00
Roccoon
96ce54e83f http3: add client trace support (#4749)
Since the QUIC connection establishment process includes TLS handshake logic,
Connect and TLS handshake are called in the following order:

ConnectStart -> TLSHandshakeStart -> TLSHandshakeDone -> ConnectDone.

Notice: Wait100Continue not implemented as quic-go doesn't support handling
Expect: 100-continue.
2025-01-14 12:50:16 +08:00
Marten Seemann
516220b0c5 ackhandler: migrate sent packet history tests away from Ginkgo (#4869) 2025-01-13 10:27:12 +08:00
Marten Seemann
61adb85052 use testing.T.Tempdir and Setenv in QLOGDIR integration test (#4868) 2025-01-13 10:02:13 +08:00
Marten Seemann
e448aefdf0 ackhandler: migrate received packet handler tests away from Ginkgo (#4865) 2025-01-12 21:40:55 +08:00
Marten Seemann
3f0f399540 ackhandler: migrate received packet tracker tests away from Ginkgo (#4864) 2025-01-12 21:28:26 +08:00
Marten Seemann
9d1c1d4e7f ackhandler: migrate received packet history tests away from Ginkgo (#4863) 2025-01-12 21:18:53 +08:00
Marten Seemann
f18d42fd23 ackhandler: migrate ack-elicitng and send mode tests away from Ginkgo (#4862) 2025-01-12 21:09:37 +08:00
Marten Seemann
00d5d6f839 migrate the send queue tests away from Ginkgo (#4861) 2025-01-12 16:14:25 +08:00
Marten Seemann
5243f13474 migrate the connection ID manager tests away from Ginkgo (#4860) 2025-01-12 15:07:11 +08:00
Marten Seemann
4a2e4acea5 migrate the unpacker tests away from Ginkgo (#4842) 2025-01-11 21:26:15 +08:00
Marten Seemann
62947d97f5 simplify generation of stateless reset tokens (#4858) 2025-01-11 17:52:59 +08:00
Marten Seemann
9950b4c687 remove validation enforcing one Transport per net.PacketConn (#4851)
It is invalid to use a net.PacketConn in multiple Transports. However,
the validation logic is causing pain when using wrapped net.PacketConns.
It was introduce to guard against incorrect uses of the API when the
Transport was introduced, but this is probably less relevant now than it
was back then.
2025-01-10 09:32:52 +08:00
Marten Seemann
cc6b7faafb http3: keep QUIC connection after request context expires (#4854) 2025-01-09 18:55:10 +08:00
Marten Seemann
420f852f86 drain server's accept queue before returning ErrClosed from Accept (#4846) 2025-01-08 21:59:05 +08:00
Marten Seemann
793389b322 migrate the frame sorter tests away from Ginkgo (#4853) 2025-01-08 21:44:24 +08:00
Marten Seemann
c42f8456ab optimize packetization of DATA_BLOCKED frames (#4845)
DATA_BLOCKED frames should be sent in the same as the STREAM frames that
resulted in the connection becoming blocked on connection flow control.
If there's not enough space left in that packet, the DATA_BLOCKED frame
is sent in the next packet.
2025-01-08 11:41:10 +08:00
Marten Seemann
5a6187c870 reliably queue MAX_DATA frames (#4844) 2025-01-08 09:53:23 +08:00
Marten Seemann
076db77a26 migrate the datagram queue tests away from Ginkgo (#4849) 2025-01-08 01:48:37 +08:00
Marten Seemann
c6561bbb85 migrate the crypto stream manager tests away from Ginkgo (#4847) 2025-01-08 01:29:32 +08:00
Marten Seemann
3e63e58bae migrate the closed connection tests away from Ginkgo (#4848) 2025-01-08 01:10:31 +08:00
Marten Seemann
3cb5f3e104 optimize packing of STREAM_DATA_BLOCKED frames (#4801)
* refactor the framer to pack both control and STREAM frames

* refactor framer STREAM frame packing logic

* pack STREAM_DATA_BLOCKED in the same packet as the STREAM frame

This makes debugging easier (and is slightly more efficient). In the
pathological case where there is not enough space remaning in the packet
to pack the STREAM_DATA_BLOCKED frame, it is queued for the next packet.

* add an integration test
2025-01-07 12:06:00 +08:00
Marten Seemann
4ab8ec49d1 fix flaky TestConnectionCongestionControl (#4839) 2025-01-06 17:05:43 +08:00
Marten Seemann
3ffe961079 migrate the crypto stream tests away from Ginkgo (#4837) 2025-01-06 16:17:50 +08:00
Marten Seemann
febf2809e0 fix GSO sending logic to respect ECN marking changes (#4835) 2025-01-06 15:47:00 +08:00
Marten Seemann
421332c716 validate the stream ID of STREAM_DATA_BLOCKED frames (#4836) 2025-01-06 15:38:36 +08:00
Marten Seemann
d87e2bb649 ackhandler: remove error return value of SentPacketHandler.ResetForRetry (#4834) 2025-01-06 15:05:19 +08:00
Marten Seemann
f41a6a644d migrate the connection tests away from Ginkgo (#4823) 2025-01-06 14:48:11 +08:00
Marten Seemann
9b55fbe0be fix flaky TestSendStreamStopSending (#4832) 2025-01-03 23:17:37 +08:00
Marco Munizaga
ea6d198c3d drain received packets when the connection is closed (#4773)
* clear receivedPackets buffer on connection close

If packets were queued up in our receivedPackets queue when we closed
the connection we would fail reuse them. Eventually the GC would have to
clean this as trash.

* move drain logic to defer in run
2024-12-31 14:38:57 +08:00
Marten Seemann
0b9bd3c4de remove redundant bool return value from sendStream.popStreamFrame (#4828) 2024-12-31 13:51:14 +08:00
Marten Seemann
f337891fc8 trace packets that the transport doesn't send a stateless reset for (#4826) 2024-12-31 13:36:16 +08:00
Marten Seemann
a32d31288e remove hardcoded maximum keep-alive period (#4827)
The keep-alive period can be set using Config.KeepAlivePeriod. While
very large values will likely make keep-alives ineffective (depending on
the NATs in the path), there's no good reason to hardcode a maximum
value.
2024-12-31 11:26:40 +08:00
Marten Seemann
eec74b14c6 fix errors.Is for StreamError and DatagramTooLargeError (#4825) 2024-12-29 17:56:38 +08:00
Marten Seemann
46546ce497 qerr: fix errors.Is for TransportError and ApplicationError (#4824) 2024-12-29 16:42:24 +08:00
Marten Seemann
f45daa0c05 migrate the send conn tests away from Ginkgo (#4817) 2024-12-28 21:20:38 +08:00
Marten Seemann
52757a97e9 fix flaky MITM packet corruption test (#4821) 2024-12-28 19:39:17 +08:00
Marten Seemann
bd2b50d826 migrate the packet handler map tests away from Ginkgo (#4816) 2024-12-28 18:48:28 +08:00