Commit graph

635 commits

Author SHA1 Message Date
Marten Seemann
595f6f814a introduce a quic.Config.HandshakeIdleTimeout, remove HandshakeTimeout 2020-12-08 16:12:39 +07:00
Marten Seemann
3cd8b30ea6
Merge pull request #2856 from lucas-clemente/conn-id-update-handshake-completion
wait until the handshake is complete before updating the connection ID
2020-11-10 20:52:09 +07:00
Marten Seemann
e8a9888f25
Merge pull request #2857 from lucas-clemente/fix-spa-conn-id-handling
only check the SCID for Initial packets
2020-11-10 20:51:28 +07:00
Marten Seemann
0c2f562411 allow an amplification factor of 3.x 2020-11-06 14:16:11 +07:00
Marten Seemann
337e2171ef only check the SCID for Initial packets
There's no risk that Handshake packets could be injected by an attacker.
2020-11-02 16:24:02 +07:00
Marten Seemann
80534c0944 wait until the handshake is complete before updating the connection ID 2020-11-02 16:21:38 +07:00
Marten Seemann
5c5e1024e7 send STREAMS_BLOCKED frame when MAX_STREAMS frame allows too few streams 2020-10-30 15:28:09 +07:00
Marten Seemann
8752576f26 run gofumpt, enable the gofumpt linter 2020-10-26 09:33:35 +07:00
Marten Seemann
145e7b10d0
Merge pull request #2811 from lucas-clemente/fix-first-key-update
allow the first key update immediately after handshake confirmation
2020-10-06 20:23:19 +07:00
Marten Seemann
55a07c34ee add the exhaustive linter 2020-10-05 13:47:57 +07:00
Marten Seemann
bbd9fa4862 remove the EncryptionUnspecified enum value 2020-10-05 13:17:06 +07:00
Marten Seemann
b9090d71ae rename cryptoSetup.DropHandshakeKeys() to SetHandshakeConfirmed() 2020-09-30 12:14:16 +07:00
Marten Seemann
b4636469fa refactor confirmation of the handshake 2020-09-30 12:05:33 +07:00
Marten Seemann
ea3d32394d read the ECN bits 2020-09-15 10:51:22 +07:00
Marten Seemann
fa4f0a9e7a keep track of ECN counts on received packets 2020-09-14 17:01:34 +07:00
Marten Seemann
a528c4c4da close session on errors unpacking errors other than decryption errors 2020-09-09 23:59:24 +07:00
Marten Seemann
e0824e3163 move the logging mock implementations to a separate package 2020-09-09 15:15:49 +07:00
Marten Seemann
556bf18dbf inject a random source into the token protector 2020-08-23 17:06:17 +07:00
Marten Seemann
89417ab5ca simplify the connection, rename it to sendConn 2020-08-09 19:24:04 +07:00
Marten Seemann
8db76ab9c2 only arm the application data PTO timer after the handshake is confirmed 2020-07-27 16:40:21 +07:00
Marten Seemann
0b7efe10d1 trace congestion state changes 2020-07-23 11:53:59 +07:00
Marten Seemann
0d4aa4b34f introduce a function receivedPacket.Size() 2020-07-15 19:30:10 +07:00
Marten Seemann
a1bb39d6ab introduce a protocol.StatelessResetToken 2020-07-10 19:55:20 +07:00
Marten Seemann
0ef1b2f92e pass around the stateless reset token directly, not pointers to it
Benchmarks show that it's actually faster to make a copy of this 16 byte
array than passing around a pointer to it.
2020-07-10 19:44:57 +07:00
Marten Seemann
1f676c2a6c use an errors.As comparison to detect stateless resets in the session 2020-07-10 19:43:54 +07:00
Marten Seemann
f93708aca8 introduce a logging.CloseReason to log the reason a session was closed
This also allows us to get rid of the ReceivedStatelessReset() method.
2020-07-10 19:23:32 +07:00
Marten Seemann
7d6ce4ea45 rename the logging.CloseReason to TimeoutReason 2020-07-10 19:17:21 +07:00
Marten Seemann
f16d474e7c
Merge pull request #2664 from lucas-clemente/move-versions-out-of-the-header
move the SupportedVersions slice out of the wire.Header
2020-07-10 18:24:46 +07:00
Marten Seemann
61d8e111b1 don't send write error in CONNECTION_CLOSE frames 2020-07-09 18:09:20 +07:00
Marten Seemann
993d71fd56 move the SupportedVersions slice out of the wire.Header 2020-07-09 12:05:33 +07:00
Marten Seemann
25db2166dd enforce that a conn ID is not retired in a packet that uses that conn ID 2020-07-08 12:06:57 +07:00
Marten Seemann
ed120f670c add logging aliases for frames, create a logging.STREAM and CRYPTO frame 2020-07-06 09:21:32 +07:00
Marten Seemann
865332015c rename ResetStreamFrame.ByteOffset to FinalSize 2020-07-02 16:41:43 +07:00
Marten Seemann
fa07078d81 rename DataBlockedFrame.DataLimit to MaximumData 2020-07-02 16:41:43 +07:00
Marten Seemann
5466de6565 rename MaxStreamDataFrame.ByteOffset to MaximumStreamData 2020-07-02 16:41:43 +07:00
Marten Seemann
f4519cfd32 rename MaxDataFrame.ByteOffset to MaximumData 2020-07-02 16:41:43 +07:00
Marten Seemann
4121ea84f4 rename the logging.Tracer to ConnectionTracer 2020-07-01 16:57:01 +07:00
Marten Seemann
7f6eca84da replace the logging.Export() method by a Close() method 2020-07-01 16:54:44 +07:00
Marten Seemann
7fdace490c rename qlogger (member) variables to tracer 2020-07-01 16:53:45 +07:00
Marten Seemann
78ba619a0b split the qlog package into a logging and a qlog package 2020-07-01 16:49:24 +07:00
Marten Seemann
06ad477b9b handle Version Negotiation packets in the session 2020-07-01 14:19:45 +07:00
Marten Seemann
fe622dd780 use a token bucket pacing algorithm 2020-06-22 14:31:37 +07:00
Marten Seemann
4f19b15670 set and verify the retry_source_connection_id TP 2020-05-29 19:57:39 +07:00
Marten Seemann
fb2a5f413e set and verify the initial_source_connection_id 2020-05-29 19:50:14 +07:00
Marten Seemann
b391cce35c always send the original_destination_connection_id TP as a server 2020-05-29 19:50:14 +07:00
Marten Seemann
7e62a2fecc rename original_connection_id to original_destination_connection_id TP 2020-05-29 19:50:14 +07:00
Marten Seemann
8d00ec135e
Merge pull request #2569 from lucas-clemente/drop-duplicate-packets
drop duplicate packets
2020-05-29 16:39:46 +07:00
Marten Seemann
60a918a108 limit available window to 3x of received bytes before address validation 2020-05-27 09:40:50 +07:00
Marten Seemann
98233f6743 add a way to pack coalesced packets smaller than the usual packet size 2020-05-27 09:33:34 +07:00
Marten Seemann
440ff107a3 drop duplicate packets
Duplicate detection uses the same data structure that is used to track
received packets to generate ACK frames. That means that after an old
ACK range has been pruned, a severly delayed packet might be incorrectly
detected as a duplicate.
As we wouldn't have acknowledged receipt of this packet, this situation
would have resulted in a retransmission by the peer anyway, so dropping
the packet won't cause a big regression.
2020-05-27 09:20:51 +07:00