Marten Seemann
4b17343631
rename the session to connection
2022-03-27 12:50:14 +01:00
Marten Seemann
a088ba4607
rename quicConn.earlySessionReady to quicConn.earlyConnReady
2022-03-27 11:27:25 +01:00
Marten Seemann
1ae835d1d8
rename occurrences of session in client, server and packetHandlerMap
2022-03-27 11:27:25 +01:00
Marten Seemann
86338d3ce0
rename the sessionRunner to connRunner
2022-03-27 11:27:25 +01:00
Marten Seemann
97690dc493
rename the closed session to closed conn
2022-03-27 11:27:25 +01:00
Marten Seemann
e71c236232
rename the Session to Connection
2022-03-27 11:27:23 +01:00
Rachel Chen
fd2c345152
sendQueue: ignore "datagram too large" error ( #3328 )
...
This commit introduces additional platform-dependent checking when the
kernel returns an error. Previously, the session is terminated when
PingFrame sends a discovery packet larger than the limit. With this
commit, the error is checked, and if it is "datagram too large", the
error is ignored.
Additionally,
1. This commit re-enables MTU discovery on Windows unless it
is disabled explicitly by user (Undo #3276 ),
2. Set IP_DONTFRAGMENT and IPV6_DONTFRAG with error checking on Windows,
and
3. Set IP_MTU_DISCOVERY to PMTUDISC_DO for both IPv4 and IPv6 on Linux
so that the kernel will return "message too long".
Fixes #3273 #3327
2022-02-20 00:21:32 -08:00
Marten Seemann
d410b590e9
disable Path MTU Discovery on Windows
2021-09-17 18:24:26 +02:00
Marten Seemann
dbb517858e
fix incorrect usage of errors.Is
...
errors.Is is supposed to used for equality of errors, not for type
assertions. That's what errors.As is there for.
2021-06-28 15:29:52 -07:00
Marten Seemann
1613809ba2
use the new error types to log the reason why a connection is closed
2021-05-03 14:00:41 +07:00
Marten Seemann
93cfef57ca
expose a StatelessResetError
2021-05-01 09:39:51 +07:00
Marten Seemann
592fb9cad9
introduce a dedicated qerr.TransportError and qerr.ApplicationError
2021-05-01 09:38:48 +07:00
Marten Seemann
d2739abd74
Merge pull request #3148 from lucas-clemente/fix-on-loss-detection-busy-looping
...
declare the handshake confirmed when receiving an ACK for a 1-RTT packet
2021-04-30 23:57:17 +07:00
Marten Seemann
0413afd615
Merge pull request #3153 from lucas-clemente/trace-version-selection
...
trace and qlog version selection / negotiation
2021-04-28 18:13:18 +07:00
Marten Seemann
e7c4e756ad
trace and qlog version selection / negotiation
2021-04-19 11:38:10 +07:00
Marten Seemann
17d9860db6
declare the handshake confirmed when receiving an ACK for a 1-RTT packet
...
... on the client side. Both the receipt of HANDSHAKE_DONE and the
receipt of an ACK for a 1-RTT packet are sufficient for declaring
confirmation of the handshake.
2021-04-14 22:33:45 +07:00
Marten Seemann
4917760726
attach a tracing ID to the session context
2021-04-14 16:39:41 +07:00
Marten Seemann
e3f36af2e2
Merge pull request #3109 from lucas-clemente/version-negotiation-logging
...
don't pass the QUIC version to the StartedConnection event
2021-04-02 19:29:55 +07:00
Marten Seemann
4b10e67bf1
Merge pull request #3132 from lucas-clemente/amplification-limit-fixes
...
various amplification limit fixes
2021-04-02 18:32:38 +07:00
Marten Seemann
431a1fa650
Merge pull request #3120 from lucas-clemente/fix-handshake-idle-timeout
...
fix calculation of the handshake idle timeout
2021-04-02 18:32:24 +07:00
Marten Seemann
63e810f0d8
fix calculation of the handshake idle timeout
2021-04-02 18:19:38 +07:00
Marten Seemann
7f55fc7107
Merge pull request #3138 from lucas-clemente/pmtud-after-handshake-confirmation
...
only start PMTUD after handshake confirmation
2021-04-02 18:02:40 +07:00
Marten Seemann
22daaf4536
don't call ClosedConnection when closing for version negotiation
2021-04-02 17:35:20 +07:00
Marten Seemann
c30a45ef6f
don't pass the QUIC version to the StartedConnection event
...
The version might change in response to a Version Negotiation packet.
2021-04-02 17:33:49 +07:00
Marten Seemann
6c0142cb4c
notify the sent packet handler about all received bytes
2021-04-02 17:20:53 +07:00
Marten Seemann
91629cd979
only start PMTUD after handshake confirmation
...
Our PMTUD packets are never coalesced packets. Since we try packing
coalesced packets until the handshake is confirmed, it makes sense to start
PMTUD then.
2021-04-02 17:07:00 +07:00
Marten Seemann
04fe1ea7bf
remove unneeded testutils.ComposeConnCloseFrame helper function
2021-03-20 09:57:04 +08:00
Marten Seemann
7d6be20fdc
remove unneeded testutils.ComposeAckFrame helper function
2021-03-20 09:55:26 +08:00
Marten Seemann
5073e300a6
Merge pull request #3092 from lucas-clemente/version-negotiation-failure-logging
...
make it possible to detect version negotiation failures in logging, fix qlogging of those
2021-03-16 22:17:34 +08:00
Marten Seemann
1d2756f9f7
Merge pull request #3085 from lucas-clemente/client-hold-tp-until-handshake-completion
...
only apply server's transport parameters after handshake completion
2021-03-16 22:16:46 +08:00
Marten Seemann
5208845191
introduce a logging.CloseReason for version negotiation errors
2021-03-15 13:36:45 +08:00
Marten Seemann
c27f5a55b3
rename sendStream.handleMaxStreamDataFrame to updateSendWindow
2021-03-12 13:36:23 +08:00
Marten Seemann
d970a1027d
only apply server's transport parameters after handshake completion
...
On the client side, 0-RTT packets have to be sent using the old
transport parameters. We're only allowed to use the updated values for
1-RTT packets.
2021-03-11 18:58:22 +08:00
Marten Seemann
8a0b1dd78d
remove unused error return value from HandleMaxStreamsFrame
2021-03-07 12:36:50 +08:00
Marten Seemann
f513437854
Merge pull request #3062 from lucas-clemente/fix-retry-draft-34
...
fix retry key and nonce for draft-34
2021-03-04 11:13:34 +08:00
Marten Seemann
bd172b2a5a
fix retry key and nonce for draft-34
2021-03-03 23:01:42 +08:00
Marten Seemann
ac87292e87
start path MTU discovery when the handshake completes
2021-03-03 12:00:51 +08:00
Marten Seemann
82ac6dcf6d
rename MaxReceivePacketSize to MaxPacketBufferSize
...
We use the same buffer size for sending and receiving packets.
2021-03-03 12:00:14 +08:00
Marten Seemann
53270dde9e
only read multiple packets at a time after handshake completion
...
It's more important that acknowledge packets in a timely manner before
handshake completion. On the server side, we should send out the HANDSHAKE_DONE
frame as soon as possible.
2021-03-03 11:33:00 +08:00
Marten Seemann
6ece64d8a5
log connection IDs without the 0x prefix
2021-02-11 09:45:40 +08:00
Marten Seemann
281e8ca7c0
prioritize receiving packets over sending out more packets
2021-01-20 12:47:56 +08:00
Marten Seemann
2c2b758dee
allow sending of ACKs when pacing limited
...
An endpoint that is only receiving data won't have an accurate estimate
of the congestion window, and therefore derive a very low pacing
frequency.
In this situation it still needs to be able to send frequent ACKs to the
peer in order to allow full utilization of the bandwidth. We therefore
need to allow ACKs even when pacing-limited.
2021-01-19 11:49:31 +08:00
Marten Seemann
b81a6f875b
don't generate new packets when the send queue is full
2021-01-17 16:18:17 +08:00
Marten Seemann
f1c6421845
introduce an interface for the send queue, use a mock in session tests
2021-01-17 16:18:17 +08:00
Marten Seemann
e9848fadf9
remove stay print statement from session test
2021-01-17 16:18:03 +08:00
Marten Seemann
219ced5437
allow receiving of multiple packets before sending a packet
...
By draining the channel holding received packets, we reduce the number
of spurious ACKs we send. We also make sure that sending and receiving
packets is balanced, as we allow sending of a large number of packets
(if we have cwnd available and the pacing frequency is high enough).
2021-01-17 14:26:12 +08:00
Marten Seemann
4bdccca0cf
Merge pull request #2980 from lucas-clemente/fix-pacing-deadline-interpretation
...
fix interpretation of time.Time{} as a pacing deadline
2021-01-16 14:08:27 +08:00
Marten Seemann
33d058f4ee
fix interpretation of time.Time{} as a pacing deadline
...
The pacer returns the zero value of time.Time when a packet can be sent
immediately. The session uses the zero value to unset the pacing
deadline.
2021-01-16 13:35:21 +08:00
Marten Seemann
26565b023b
introduce a separate queue for undecryptable packets
...
We should prioritize the decryption of previously undecryptable packets,
every time a new encryption level becomes available. This is achieved
by introducing a separate queue instead of just putting the packets back
into the receivedPackets channel.
This also allows us to only count every received packet once for the
amplification limit.
2021-01-07 12:58:17 +08:00
Marten Seemann
ad7d90779a
remove unused initialVersion variable in session
2020-12-18 12:00:17 +07:00