Commit Graph

6718 Commits

Author SHA1 Message Date
Peter Wu
23ec5b957c fix flaky TestDatagramLoss (#5017)
Fixes #4784
2025-04-12 10:59:14 +02:00
Marten Seemann
57830ad295 migrate the incoming streams map tests away from Ginkgo (#4957) 2025-04-12 08:11:34 +02:00
Marten Seemann
213b54b010 fix flaky TestServer0RTTReordering (#5032) 2025-04-12 06:29:11 +02:00
Marten Seemann
a15ea40aa4 fix flaky TestConnectionPathValidation (#5030) 2025-04-12 05:19:08 +02:00
Marten Seemann
c9c2c86516 fix flaky TestDial test (#5029)
* give the kernel some time to free the socket

* remove problematic assertion

The listen function is started in a Goroutine, hence we
can’t be sure it’s already started.
2025-04-12 04:39:47 +02:00
Marten Seemann
ef2b87f5d5 detect stateless resets for zero-length connection IDs (#5027) 2025-04-11 15:23:53 +02:00
Marten Seemann
e76621f75a register stateless reset tokens for connection IDs used on paths (#5023)
* register stateless reset tokens for connection IDs used on paths

* retire path stateless reset tokens on closing
2025-04-09 04:31:41 +02:00
Marten Seemann
84aba71c86 refactor connection ID manager to use a slice instead of a linked list (#5022)
* refactor connection ID manager to use a slice instead of a linked list

* add a benchmark test for the connection ID manager
2025-04-08 12:02:58 +02:00
Marten Seemann
79d546379b rename ClientHelloInfo to ClientInfo (#5016)
There’s no ClientHello (which is a TLS concept) involved here.
2025-03-31 16:15:09 +02:00
Marten Seemann
3fd4f95a3b http3: simplify ConfigureTLSConfig (#5011)
The previous logic allowed for setting different ALPN
values depending on the QUIC version in use. This was
needed to set the draft ALPN value before publication of
the RFC.
2025-03-30 15:17:39 +02:00
Marten Seemann
1d8f3f281a ci: update golangci-lint to v2 (#5007) 2025-03-30 07:16:14 +02:00
Marten Seemann
4290638b55 quicvarint: refactor ifs into a switch statement (#5012)
No functional change expected.
2025-03-29 17:03:18 +01:00
Marten Seemann
78c51264b0 retransmit path probe packets (#5005)
New PATH_CHALLENGES are sent for as long as the call to
Path.Probe is active. The first retransmission is sent after 200ms,
with an exponential backoff afterwards.
2025-03-29 07:48:08 +01:00
Peter Wu
384a4b8d50 proxy: fix test timeout failures during cleanup (#5010)
Several proxy tests timed out because it got stuck in the packet read
loop after all tests have run. Avoid this by running the `conn.Close()`
Cleanup call from `newUPDConnLocalhost` before the timeout handler.

Update CI to run these tests.

Fixes: 3e87ea3f50 ("proxy: add function to simulate NAT rebinding (#4922)")
Relates to: #5009
2025-03-29 13:04:44 +08:00
Marten Seemann
623e59b2a2 ackhandler: fix qlogging of path probe timer resets and cancellations (#5003) 2025-03-23 16:02:30 +01:00
Marten Seemann
017ed984f3 ackhandler: fix panic in probe packet tracking logic (#4998)
Under certain circumstances (loss and acknowledgment patterns), the
probe packet tracking logic could run into a nil-pointer dereference.
2025-03-21 06:28:19 +01:00
Marten Seemann
da127a9a53 fix flaky TestServerGetConfigForClientAccept (#4999) 2025-03-21 06:05:46 +01:00
Marten Seemann
e4641d0325 fix flaky TestConnectionConnectionIDChanges (#4995) 2025-03-16 05:36:26 +01:00
Marten Seemann
f063e25d41 fix flaky TestServerGetConfigForClientReject (#4994) 2025-03-16 05:21:51 +01:00
Marten Seemann
6fe46d6253 send PATH_RESPONSEs on the same path (#4991)
* make it possible to pack path probes with multiple frames

* simplify function signature of pathManager.HandlePacket

* simplify connection short header packet handling logic

No functional change expected.

* make server send PATH_RESPONSEs on the same path

This makes sure that we’re actually testing for return routability.
2025-03-16 04:28:53 +01:00
Marten Seemann
7e3d668981 qlog: fix logging of unset addresses in preferred_address transport parameter (#4986) 2025-03-16 04:07:20 +01:00
pittgi
3311514d67 http3: reject duplicate pseudo headers (#4993) 2025-03-16 03:52:25 +01:00
Marten Seemann
8f23c8a404 also send PATH_RESPONSEs for reordered packets (#4990)
A reordered PATH_CHALLENGE (or one sent on a slower path)
should still trigger a PATH_RESPONSE. The RFC only forbids
switching the path unless the non-probing packet has the
highest packet number received so far.
2025-03-16 03:46:33 +01:00
Marten Seemann
9ca74c7049 wire: correctly handle undefined IPv4 / IPv6 preferred address values (#4985)
* wire: correctly handle undefined IPv4 / IPv6 preferred address values

* make use of the netip.AddrPort zero value
2025-03-15 05:27:28 +01:00
Marten Seemann
24acc54ef1 add support for connection migration (#4960) 2025-03-12 06:11:11 +01:00
Marten Seemann
0a2c2f0a82 extend connection ID generator to interact with multiple Transports (#4974)
This is needed when multiple paths are in use.
2025-03-12 05:47:58 +01:00
Marten Seemann
565b7f75ab fix flaky TestServerClose (#4973) 2025-03-06 08:30:52 +01:00
Marten Seemann
08a89e9f8b migrate the server tests away from Ginkgo (#4969) 2025-03-03 10:58:51 +01:00
Marten Seemann
09bb613c66 trace dropping of unknown-version packets when Version Negotiation is off (#4971) 2025-02-24 13:57:22 +01:00
Marten Seemann
751ca8dfb6 fix typo in UDP connection helper function in tests (#4970) 2025-02-24 09:39:29 +01:00
Marten Seemann
6033030017 proxy: add source and destination address to delay and drop callbacks (#4964) 2025-02-22 12:21:40 +01:00
Marten Seemann
eb2f986a06 refactor connection ID generator callback handling (#4961) 2025-02-22 12:06:01 +01:00
Marten Seemann
d726a795db remove unneeded tracking of acknowledgments for PATH_CHALLENGEs (#4959) v0.50.0 2025-02-16 04:37:12 +01:00
Marten Seemann
9f704c72cf ackhandler: fix handling of lost path probes on loss timer (#4956) 2025-02-14 15:29:42 +01:00
Marten Seemann
bf28da8346 handshake: use new crypto/tls 0-RTT API (#4953)
* handshake: simplify method signature of cryptoSetup.handleEvent

* use the new crypto/tls 0-RTT API
2025-02-14 03:17:01 +01:00
Marten Seemann
b32f1fa0e4 ackhandler: use Go iterators to iterate over sent packets (#4952) 2025-02-13 13:53:25 +01:00
Marten Seemann
12f2be058b bump go.mod version to Go 1.23, run 1.23 and 1.24 on CI (#4880) 2025-02-13 12:49:54 +01:00
Marten Seemann
5af39164b9 ci: update golangci-lint to v1.64.4 (#4951)
This version adds support for Go 1.24.
2025-02-13 12:33:45 +01:00
Marten Seemann
48b8182339 keep undecryptable packets when deriving 0-RTT and handshake keys (#4950)
When receiving a ClientHello for a 0-RTT connection, this allows us to derive both 0-RTT and Handshake keys at the same time. The previous logic used to inadvertently discard previously undecryptable packets (e.g. reordered 0-RTT packets).
2025-02-13 06:31:02 +01:00
Marten Seemann
5a1a34df37 implement server-side path validation logic (#4944) 2025-02-12 13:50:11 +01:00
Marten Seemann
ca26e98781 migrate the connection ID generator tests away from Ginkgo (#4948) 2025-02-12 12:00:32 +01:00
Marten Seemann
b47e86cb7f add a way to reset the MTU discoverer (#4947)
This will be used when the connection is migrated to a new path.
2025-02-11 04:50:37 +01:00
Marten Seemann
73108c2a51 fix connection busy-looping when pacing with a blocked send queue (#4943) 2025-01-28 15:10:18 +01:00
Marten Seemann
108b6603c8 ackhandler: implement timer logic for path probe packets (#4940)
* remove unused bool return value from sentPacketHandler.getPTOTimeAndSpace

* ackhandler: implement timer logic for path probing packets

Path probe packets are treated differently from regular packets: The new
path might have a vastly different RTT than the original path.

Path probe packets are declared lost 1s after they are sent. This value
can be reduced, once implement proper retransmission logic for lost path
probes.

* ackhandler: declare path probes lost on OnLossDetectionTimeout
2025-01-28 06:10:44 +01:00
Marten Seemann
6b9921bbfc refactor connection timer logic (#4927) 2025-01-28 05:08:05 +01:00
Marten Seemann
10a541bfc0 use a ringbuffer to store received packets in the connection (#4928)
Reduces memory usage by replacing a fixed-capacity channel (256) with a
ring buffer (initial capacity: 8). The buffer grows to 256 only when
many packets are enqueued.
2025-01-28 04:54:04 +01:00
Marten Seemann
02e276ed70 http3: minor simplification of panic handling logic (#4942) 2025-01-28 04:27:09 +01:00
Marten Seemann
8f27760e60 query MTU discoverer for increases after processing ACK frame (#4941) 2025-01-27 13:50:14 +01:00
Marten Seemann
7f5ea8a54d implement a path manager to track the validation status of new paths (#4938)
The path manager is responsible for generating PATH_CHALLENGE frames and
matching them with PATH_RESPONSE frames.
2025-01-27 08:10:51 +01:00
Marten Seemann
bb0b645ce9 add a method to the sendQueue to send probe packets (#4939) 2025-01-27 07:54:30 +01:00