Commit graph

772 commits

Author SHA1 Message Date
Marten Seemann
b031615db5 export a qlog when the session's run loop stops 2020-02-12 10:42:37 +07:00
Marten Seemann
8cde4ab638 refactor how session tickets are sent
Previously, RunHandshake() would send the session tickets. Now, the
session initiates the sending of the session ticket. This simplifies the
setup a bit, and it will make it possible to include the RTT estimate in
the session ticket without accessing the RTTStats concurrently.
2020-02-10 17:42:09 +07:00
Marten Seemann
93693349f3 collapse packetHandlerManager.Add and AddIfNotTaken into one function 2020-02-03 17:34:07 +01:00
Marten Seemann
634169b061 don't return a stateless reset token when adding a new connection ID
Both server and client didn't make use of the token. It was only used by
the connIDGenerator.
2020-02-03 17:31:47 +01:00
Marten Seemann
539097fc6e return a quic.ConnectionState from Session.ConnectionState() 2020-01-30 09:21:09 +07:00
Luke Tucker
6407f5bf68 Fix keepalive ping (#2316)
The firstAckElicitingPacketAfterIdleSendTime condition was inverted
in a recent PR, maybe just a typo.  This was causing only one ping
to be sent during periods of no activity.  The ack from the first
keepalive ping causes firstAckElicitingPacketAfterIdleSentTime
to be set to zero.  If there is no further activity, it will remain
zero and prevent further keepalive pings.
2020-01-27 11:13:54 +07:00
Marten Seemann
a93e544c94 remove Session.Close()
Session.Close() sends a transport-level error code. Applications should
not be able to call this function, but use CloseWithError() instead.
2020-01-26 17:41:53 +07:00
Marten Seemann
6f347233e2 update the name of the disable_active_migration transport parameter 2020-01-21 15:05:12 +07:00
Marten Seemann
5a566f2176
Merge pull request #2226 from lucas-clemente/retry-integrity
implement the retry integrity tag
2020-01-17 17:19:15 +07:00
Marten Seemann
7b10453af8 implement the Retry integrity tag 2020-01-17 13:42:57 +07:00
Marten Seemann
eeba3951ae only enable 0-RTT when using ListenEarly and DialEarly 2020-01-17 11:22:12 +07:00
Marten Seemann
079279b9cf fix mismatching expectation of the keep alive timer
session.maybeResetTimer() and session.run() were using slightly
different definitions of when a keep-alive PING should be sent. Under
certain conditions, this would make us repeatedly set a timer for the
keep-alive, but on timer expiration no keep-alive would be sent.
2020-01-08 11:09:45 +07:00
Marten Seemann
1723a16b00
Merge pull request #2273 from lucas-clemente/improve-dropped-packet-logging
log the packet size of dropped packets
2020-01-06 17:42:53 +07:00
Marten Seemann
c0e8df7bbc fix race condition when destroying the session 2020-01-04 14:57:42 +07:00
Marten Seemann
63096562a0 log the packet size of dropped packets 2020-01-02 14:52:35 +08:00
Marten Seemann
ce7583f813 add DialEarly and DialAddrEarly to dial 0-RTT connections 2020-01-01 18:04:02 +04:00
Marten Seemann
40a993e31c check that the client doesn't switch back to 0-RTT after sending 1-RTT 2020-01-01 18:04:02 +04:00
Marten Seemann
44aa12850e restore the server's transport parameters from the session ticket 2020-01-01 18:04:02 +04:00
Marten Seemann
9b0a4a8813 move unmarshaling of the transport parameters to the crypto setup 2020-01-01 18:04:01 +04:00
Marten Seemann
fc37cdc5c5 implement unpacking of 0-RTT packets 2019-12-30 18:39:21 +04:00
Marten Seemann
a9f4195fd0 check that transport params didn't change when accepting 2019-12-30 18:39:21 +04:00
Marten Seemann
355156ac4e
Merge pull request #2225 from lucas-clemente/handshake-done
implement the HANDSHAKE_DONE mechanism
2019-12-18 10:07:43 +04:00
Marten Seemann
27549c5665 use the minimum of the two peers' max_idle_timeouts 2019-12-11 14:04:33 +04:00
Marten Seemann
8dcca046e3 don't set the idle timeout timer before the handshake completes 2019-12-11 13:50:13 +04:00
Marten Seemann
12922bdec9 drop Handshake keys when receiving HANDSHAKE_DONE (as a client) 2019-12-06 10:29:48 +07:00
Marten Seemann
f7fd5d2848 drop Handshake keys as soon as the handshake completes (as a server) 2019-12-06 10:29:48 +07:00
Marten Seemann
08ec2f69fc send a HANDSHAKE_DONE frame after handshake completion (as a server) 2019-12-06 10:29:48 +07:00
Marten Seemann
8a3bdaa19f
Merge pull request #2251 from lucas-clemente/spa
retire the connection ID sent in the preferred_address transport parameter
2019-11-30 20:30:08 +07:00
Marten Seemann
e65df402dd only create a single session when two Initials arrive at the same time 2019-11-30 20:01:51 +07:00
Marten Seemann
ee6beff7cf immediately retire the connection ID sent in the preferred_address 2019-11-30 19:56:06 +07:00
Marten Seemann
5a834851a8 route retransmissions of the client's Initial to the right session 2019-11-26 17:01:21 +07:00
Marten Seemann
e2f41304f8 don't drop handshake packets after switching to a new connection ID 2019-11-25 19:04:02 +07:00
Marten Seemann
1b063a47eb
Merge pull request #2247 from lucas-clemente/improve-undecryptable-packet-logging
improve logging of undecryptable packets
2019-11-25 18:46:20 +07:00
Marten Seemann
78029adfb2 improve logging of undecryptable packets 2019-11-25 14:06:44 +07:00
Marten Seemann
d0a3eaa8a3 improve logging of handshake messages 2019-11-25 09:09:34 +07:00
Marten Seemann
d77e400f00 don't send application-level errors before completion of the handshake 2019-11-23 11:30:20 +07:00
Marten Seemann
92b898e811
Merge pull request #2218 from lucas-clemente/pto-per-pn-space
change PTO to be per packet number space
2019-11-22 18:35:05 +08:00
Marten Seemann
8fb86568bf use the receive time of a packet for tracing 2019-11-19 10:10:23 +08:00
Marten Seemann
da996f8066 fix recording of sent and lost frames for quic-trace 2019-11-18 12:50:16 +08:00
Marten Seemann
f3e3def599 don't send application data probe packets before the handshake completes 2019-11-12 14:12:24 +07:00
Marten Seemann
9c3b553e47 change PTO to be per packet number space 2019-11-12 11:29:51 +07:00
Marten Seemann
3db60534cf use a sentinel error when a sealer is not yet available 2019-11-12 11:27:30 +07:00
Marten Seemann
bd94f21ab0 send keep alive PINGs at least every 20 seconds 2019-11-10 11:06:38 +07:00
Marten Seemann
312fb638be send the frame type in CONNECTION_CLOSE frames 2019-11-09 11:39:35 +07:00
Marten Seemann
6a9a591a10 use application-specific CONNECTION_CLOSE for normal termination 2019-11-08 14:22:50 +07:00
Marten Seemann
a472ac4731 use application-specific CONNECTION_CLOSE for application errors 2019-11-08 13:52:15 +07:00
Marten Seemann
04105625ae issue new connection IDs 2019-11-05 11:00:07 +07:00
Marten Seemann
35ea8213c5 move initialization of the client's transport parameters to the session 2019-11-05 11:00:06 +07:00
Marten Seemann
b64535e656 move initialization of the server's transport parameters to the session 2019-11-05 10:59:21 +07:00
Marten Seemann
90643f5756 move initialization of the client's transport parameters to the session 2019-11-05 10:59:21 +07:00