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
cb6db58fc1
use a uint64 in the AllowConnectionWindowIncrease callback
2022-01-18 09:23:56 +04:00
Marten Seemann
bfd685faf2
add a AllowConnectionWindowIncrease config option
2022-01-14 12:04:04 +04:00
Marten Seemann
f9904c7c45
add a callback to block window increases to the connection flow controller
2022-01-14 12:03:30 +04:00
Marten Seemann
e6572e3d0a
Merge pull request #3276 from lucas-clemente/windows-disable-pmtud
...
disable Path MTU Discovery on Windows
2021-10-13 08:55:42 +01:00
Marten Seemann
d410b590e9
disable Path MTU Discovery on Windows
2021-09-17 18:24:26 +02:00
Marten Seemann
a54b00e770
enter the regular run loop if no undecryptable packet was processed
2021-09-08 15:35:53 +01:00
Marten Seemann
afaaaf97d0
Merge pull request #3215 from lucas-clemente/fix-errors-is
...
fix incorrect usage of errors.Is
2021-06-28 17:53:14 -07: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
Mathis Engelbart
75d2276430
Return error on SendMessage when session is closed
2021-06-28 11:15:37 +02: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
1ce572228b
expose a VersionNegoationError
2021-05-01 09:39:24 +07:00
Marten Seemann
42b61729bd
expose the TransportError and the ApplicationError
2021-05-01 09:38:49 +07:00
Marten Seemann
f5238bf7b1
move the ApplicationErrorCdoe to the qerr package
2021-05-01 09:38:49 +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
f60306c4bf
Merge pull request #3107 from lucas-clemente/fix-cubic-initialization
...
initialize the congestion controller with the actual max datagram size
2021-04-02 17:35:13 +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
8c388e0aaf
Merge pull request #3112 from lucas-clemente/fix-timeout-error-logging
...
fix duplicate logging of errors when the first error was a timeout error
2021-04-02 17:24:45 +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
Ari Mattila
e098ccd2b3
fix calculation of the time for the next keep alive
2021-03-26 16:28:13 +07:00
Marten Seemann
04074fbea3
remove special treatment of timeout error when logging
2021-03-22 14:29:07 +08:00
Marten Seemann
154b55b50a
introduce a qerr.Err{Idle,Handshake}Timeout
2021-03-22 14:22:36 +08:00
Marten Seemann
7feda789d2
initialize the congestion controller with the actual max datagram size
2021-03-20 14:02:28 +08:00
Marten Seemann
7ea53e6c2c
rename the Config values for Max{Stream, Connection}ReceiveWindow
2021-03-16 23:15:18 +08:00
Marten Seemann
354bbb0e2e
rename the Config values for Initial{Stream, Connection}ReceiveWindow
2021-03-16 23:15:18 +08:00
Marten Seemann
f51eff48e9
Merge pull request #3093 from lucas-clemente/improve-packet-info
...
cache the serialized OOB in the conn, not in the packet info
2021-03-16 22:18:25 +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
59eb3ed2fb
Merge pull request #3083 from lucas-clemente/configure-initial-flow-control-window
...
make the initial stream / connection flow control windows configurable
2021-03-16 22:17:08 +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
6102a9b308
Merge pull request #3088 from lucas-clemente/update-flow-control-for-0rtt-streams
...
update the flow control windows of streams opened in 0-RTT
2021-03-16 22:15:53 +08:00
Marten Seemann
162cb16b31
cache the serialized OOB in the conn, not in the packet info
...
We're allocating a lot of packetInfo structs during the lifetime of a
connection. It's better to keep that struct as small as possible.
2021-03-16 14:04:15 +08:00
Olivier Poitrey
eb6bdfdfc1
Use the correct source IP when binding multiple IPs
...
When the server is listening on multiple interfaces or interfaces with
multiple IPs, the outgoing datagrams are sometime delivered with the
wrong source IP address.
In order to fix that, each quic connection needs to extract the
destination IP (and optionally interface id) of the received datagrams,
and set it as source IP (and interface) on the sent datagrams.
On most platforms, this can be done using ancillary data with recvmsg()
and sendmsg(). Some of the machinery for this is already there for ECN,
this change extends it to read the destination IP info and write it to
the outgoing packets.
Fix #1736
2021-03-16 00:50:05 +01: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
a15cfd6871
make the initial connection flow control window configurable
2021-03-10 15:04:38 +08:00
Marten Seemann
d9434f523e
make the initial stream flow control window configurable
2021-03-10 14:58:15 +08:00