Commit Graph

6767 Commits

Author SHA1 Message Date
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
Marten Seemann
1ccf2c3bff fix accounting for lost RESET_STREAM frames in the send stream (#4804) 2024-12-28 17:09:14 +08:00
Marten Seemann
72a934f375 don't enqueue send stream for sending on duplicate Close calls (#4815) 2024-12-28 16:43:16 +08:00
Marten Seemann
810ef27db5 don't generate empty STREAM frames in the send stream (#4812) 2024-12-28 16:21:48 +08:00
Marten Seemann
55687a684f migrate multiplexer tests away from Ginkgo (#4814)
Also fixes the tests to properly clean up the multiplexer.
2024-12-28 16:10:34 +08:00
Marten Seemann
1ea7929453 fix flaky TestSendStreamLargeWrites (#4813) 2024-12-28 16:02:20 +08:00
Marten Seemann
9cf118fc82 fix flaky MITM packet injection test (#4810)
Instead of transferring data in one direction, we should echo the data
sent. This makes sure that a roughly equal number of packets is sent in
each direction.
2024-12-28 15:38:54 +08:00
Marten Seemann
56bebc4e61 migrate the stream tests away from Ginkgo (#4799)
* translate the receive stream tests

* translate the send stream tests

* translate the stream tests
2024-12-28 15:06:24 +08:00
RPRX
3552381374 http3: allow concurrent calls to Body.Close (#4798) 2024-12-28 10:52:17 +08:00
Marten Seemann
f6e7789854 ci: disable SA1029 staticcheck (context key check) in test files (#4802) 2024-12-27 17:31:21 +08:00
Marten Seemann
e653d54b21 migrate the packet packer tests away from Ginkgo (#4788) 2024-12-27 11:53:40 +08:00
Marten Seemann
baee2b4aa0 migrate platform-dependent UDP socket test code away from Ginkgo (#4797) 2024-12-26 15:02:18 +08:00
Marten Seemann
29ad06c8fa migrate the TokenStore tests away from Ginkgo (#4795) 2024-12-24 18:25:15 +08:00
Marten Seemann
abfd38d3f6 migrate the buffer pool tests away from Ginkgo (#4796) 2024-12-24 18:06:38 +08:00
Marten Seemann
484c0ba7b4 wire: don't allocate an empty data slice for empty STREAM frames (#4794)
Minor optimization, but it simplifies testing in some cases.
2024-12-24 13:16:32 +08:00
Marten Seemann
7d54aa41a3 remove unneeded Connection.GetVersion method (#4792)
Instead, use Connection.ConnectionState().Version.
2024-12-23 20:29:26 +08:00
Marten Seemann
0264fd6f4f migrate the config tests away from Ginkgo (#4790) 2024-12-23 19:04:26 +08:00
Marten Seemann
c92207c72b trace dropping of packets by the Transport when no server is set (#4789) 2024-12-23 18:54:46 +08:00
Marten Seemann
b493c5d827 migrate the transport tests away from Ginkgo (#4783)
* migrate the transport tests away from Ginkgo

* simplify mock net.PacketConn implementation
2024-12-23 14:47:44 +08:00