Commit Graph

670 Commits

Author SHA1 Message Date
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
Marten Seemann
33694fd77b fix flaky session unit test 2020-05-11 16:03:16 +07:00
Marten Seemann
5a169b3c9a fix racy session unit test 2020-05-06 11:15:18 +07:00
Marten Seemann
f2efe19c3c fix race conditions in the packet sending tests in the session 2020-05-05 14:37:18 +07:00
Marten Seemann
e1d1421111 fix racy idle timeout test in the session 2020-05-05 14:37:18 +07:00
Marten Seemann
de3f04f697 fix racy transport parameter test in the session 2020-05-05 14:37:18 +07:00
Marten Seemann
2ea3b534bc fix race conditions in the session tests that test closing 2020-05-05 14:37:18 +07:00
Marten Seemann
aabdb172ff fix race condition in the client session tests 2020-05-05 14:37:18 +07:00
Marten Seemann
d1d4e5ce02 reset the PTO count when receiving a Retry 2020-04-17 15:15:11 +07:00
Marten Seemann
dc3c96debf qlog session timeouts 2020-04-17 08:23:25 +07:00
Marten Seemann
5a720f0af0 drop packets with version numbers that don't match the session's version 2020-04-16 09:41:33 +07:00
Marten Seemann
5bd6252616 Merge pull request #2480 from lucas-clemente/qlog-dropped-retry
qlog dropped Retry packets
2020-04-16 09:31:47 +07:00
Marten Seemann
24508a3d39 qlog dropped Retry packets 2020-04-12 19:26:30 +07:00
Marten Seemann
f58eb47383 qlog when packets are dropped due to unsupported QUIC version 2020-04-10 14:39:02 +07:00
Marten Seemann
899e1694d7 add a test for dropped packets due to header parsing errors 2020-04-10 14:35:37 +07:00
Marten Seemann
8e76881bc4 Merge pull request #2477 from lucas-clemente/fix-corrupted-scid
update the source connection ID if the session was created from an invalid Initial
2020-04-09 00:45:15 +07:00