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
Marten Seemann
6f4c002513
fix flaky TestConnectionReceivePrioritization ( #4936 )
2025-01-27 04:40:46 +01:00
Marten Seemann
e524d0c1ff
implement connection ID handling for path probe packets ( #4935 )
2025-01-27 04:06:08 +01:00
Marten Seemann
895faf6dc9
ackhandler: add path probe tracking logic to sent packet history ( #4934 )
2025-01-26 15:14:55 +01:00
Marten Seemann
94dc188974
add methods to change the remote address of the sendConn ( #4933 )
2025-01-26 14:46:01 +01:00
Marten Seemann
b098a75cf3
add a packet packer method to pack path probe packets ( #4932 )
2025-01-26 14:28:16 +01:00
Marten Seemann
9765f54dd2
utils: add a method to reset RTTStats for connection migration ( #4930 )
2025-01-26 09:37:31 +01:00
Marten Seemann
c63c4e6990
congestion: migrate the pacer tests away from Ginkgo ( #4929 )
2025-01-26 09:14:03 +01:00
Marten Seemann
ac25c646ad
refactor packet handling into a separate function ( #4926 )
2025-01-26 06:17:40 +01:00
Marten Seemann
19213b24bc
refactor connection error propagation ( #4925 )
2025-01-26 06:01:29 +01:00
Marten Seemann
383b634df6
simplify handling of packet unpacking errors ( #4924 )
2025-01-26 05:43:26 +01:00
Marten Seemann
f20b823154
proxy: optimize packet sorting logic ( #4923 )
2025-01-26 05:27:12 +01:00
Marten Seemann
3e87ea3f50
proxy: add function to simulate NAT rebinding ( #4922 )
2025-01-26 05:03:08 +01:00
Marten Seemann
79bae396b4
proxy: rename to Proxy, refactor initialization ( #4921 )
...
* proxy: rename to Proxy, refactor initialization
* improve documentation
2025-01-25 11:13:33 +01:00
Marten Seemann
f5145eb627
proxy: remove QuicProxy.LocalPort method ( #4920 )
2025-01-25 04:18:22 +01:00
Marten Seemann
79003d1618
ackhandler: remove unneeded error return from packet history iterator ( #4917 )
...
No functional change expected.
2025-01-24 04:45:38 +01:00
Julien Salleyron
c385cd10f1
handshake: lazily create the AEAD used for Retry ( #4916 )
...
* Change init to sync.Once to handle fips-only setup.
* review.
* use the mutex instead of the sync.Once
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
v0.49.0
2025-01-23 13:36:29 +01:00
Marten Seemann
fb9d8e3ede
metrics: add Prometheus metrics for sent and received packets ( #4910 )
...
* add Prometheus metrics for sent long and short header packets
* add Prometheus metrics for received long and short header packets
* add Grafana panels for sent and received packets
2025-01-23 12:52:23 +08:00
Marten Seemann
e12f91cfc7
clean up MTU probe packet sending logic ( #4914 )
...
As the comment said, using the pacing deadline was a hack. Instead, we
can just schedule sending, and loop around the run loop one more time.
2025-01-23 12:35:29 +08:00
Marten Seemann
a4c9b04c58
simply PTO probe packet sending logic ( #4913 )
...
No functional change expected.
2025-01-23 12:26:30 +08:00
Marten Seemann
d41f9749d3
fix memory leak on connection ID rotation when closing connection ( #4852 )
...
* fix memory leak on connection ID rotation during CONNECTION_CLOSE
In rare instances, the connection ID manager might switch to a new
connection ID when sending the packet containing the CONNECTION_CLOSE
frame. The connection ID manager removes the active stateless reset
token from the packet handler map when it is closed, so we need to make
sure that this happens last, otherwise the packet handler will keep a
pointer to the closed connection indefinitely.
* defer
* panic on use of connIDManager after Close
2025-01-22 19:35:16 +08:00
Marten Seemann
302308335c
migrate the MTU discoverer tests away from Ginkgo ( #4907 )
2025-01-21 20:17:15 +08:00
Marten Seemann
bea70c6489
fix flaky TestALPN integration test ( #4909 )
2025-01-21 20:04:26 +08:00
Marten Seemann
eb70424fba
fix race condition on concurrent use of Transport.Dial and Close ( #4904 )
2025-01-21 17:52:16 +08:00
Marten Seemann
5d4835e422
preserve error from SendStream during cancellation and closing ( #4882 )
...
* preserve error from cancelled SendStream during cancellation and closing
* clarify that canceling a send stream after closing is valid
* preserve close and reset error when send stream is closed for shutdown
2025-01-21 17:42:47 +08:00
Marten Seemann
fba6ea90a0
avoid calling time.Now() in the MTU discoverer ( #4906 )
2025-01-21 17:31:10 +08:00
Marten Seemann
5794afbcbf
remove unused member variable in the mtuDiscoverer ( #4905 )
2025-01-21 16:29:45 +08:00
Marten Seemann
202dddd51e
wire: implement frame classification into probing / non-probing ( #4901 )
...
* wire: implement frame classification into probing / non-probing
* wire: consolidate files
* check if frame is ack eliciting and path probing in frames fuzz test
2025-01-21 14:26:04 +08:00
Marten Seemann
54b97a5079
http3: fix flaky transport tests ( #4900 )
2025-01-21 14:05:50 +08:00
Marten Seemann
07bbe8c383
add ErrTransportClosed and use it for Listen/Dial after transport close ( #4883 )
...
* add ErrTransportClosed and use it for Listen/Dial after transport close
* include the original error in the ErrTransportClosed error string
2025-01-21 13:54:40 +08:00
Marten Seemann
33fd4d1d16
ackhandler: fix ack of packet number ranges in sent packet handler tests ( #4897 )
...
The packet number generator for the application data packet number
space randomly skips packet numbers. We need to be careful to not
acknowledge a skipped packet when acknowledging a range of packets in
the sent packet handler tests.
2025-01-21 12:52:57 +08:00
Marten Seemann
bf3ccd1fb3
ackhandler: refactor loss detection timer reset logic ( #4893 )
2025-01-21 11:09:32 +08:00
Marten Seemann
5c545cac23
qlog: fix logging of packets_in_flight on the metrics_updated event ( #4895 )
...
Resetting this value to 0 needs to be logged.
2025-01-21 00:18:29 +08:00
Marten Seemann
88501cc02a
ackhandler: migrate sentPacketHandler tests away from Ginkgo ( #4881 )
2025-01-20 14:04:37 +08:00
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