Marten Seemann
dad30e7c33
only create a single session for duplicate Initials
2020-05-29 16:04:45 +07:00
Marten Seemann
a82d6bb910
qlog stateless resets
2020-03-26 20:36:26 +07:00
Marten Seemann
56211cf0b9
fix typo in log message when receiving a stateless reset
2020-03-01 13:57:33 +07:00
Marten Seemann
d642bf9098
simplify content storage in packed packets
...
It's not necessary to store both the packetBuffer and the slice
containing the raw data in the packet.
2020-02-20 16:25:54 +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
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
db396d8a78
rename packetHandlerMap.Close() to Destroy()
2020-01-22 17:59:22 +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
35ea8213c5
move initialization of the client's transport parameters to the session
2019-11-05 11:00:06 +07:00
Marten Seemann
ccb777b834
retire the stateless reset token when the session is closed
2019-11-05 10:59:21 +07:00
Marten Seemann
ffbb810fcc
retire stateless reset tokens instead of deleting them immediately
2019-11-05 10:59:21 +07:00
Marten Seemann
441b1ed84b
periodically log the number of tracked items in the packet handler map
2019-11-03 11:57:21 +07:00
Marten Seemann
c7334e3e66
replace closed sessions in the packet handler map
2019-11-02 20:32:59 +07:00
Marten Seemann
e55a14b8f0
remove unneccessary destroy of the session when retiring a connection ID
2019-11-01 11:53:57 +07:00
Marten Seemann
35e3455a97
Merge pull request #2147 from lucas-clemente/deleting-sessions
...
refactor handling of closed session
2019-10-01 13:17:44 +07:00
Marten Seemann
da0288b273
destroy sessions when deleting them from the packet handler map
2019-09-25 15:34:42 +07:00
Marten Seemann
03483d5e71
refactor how sessions are deleted
...
Replacing sessions with different structs representing a closed session
doesn't work if a session is using multiple connection IDs.
2019-09-25 15:34:38 +07:00
Marten Seemann
288c5af635
fix race condition when generating stateless reset tokens
2019-09-25 08:03:53 +07:00
Marten Seemann
ab2b26a5cb
add the unparam linter
2019-09-17 13:44:05 +07:00
Marten Seemann
3bb23836f2
Merge pull request #2105 from lucas-clemente/closed-sessions
...
refactor how packets arriving after a session is closed are handled
2019-09-07 16:27:40 +07:00
Marten Seemann
5034cb2708
simplify closing of server session when the server is closed
2019-09-05 13:25:18 +07:00
Marten Seemann
22b12f199e
replace locally closed sessions with a dedicated closed session
2019-09-01 13:59:44 +07:00
Marten Seemann
d02fd5178a
adjust the minimum size for stateless resets to the new header format
2019-08-31 12:33:53 +07:00
Marten Seemann
96db15c836
accept smaller stateless resets
2019-08-31 12:31:41 +07:00
Marten Seemann
dc75123836
fix race condition when closing the server after a Read failed
2019-05-10 09:47:52 +09:00
Marten Seemann
b3fe0fdbf9
only send stateless resets if a stateless reset key is configured
2019-03-08 18:10:16 +09:00
Marten Seemann
5c20519743
don't send stateless resets for small packets
...
This prevents amplification and looping.
2019-03-08 18:10:16 +09:00
Marten Seemann
94046cdb4b
implement sending of stateless resets
2019-03-08 18:10:15 +09:00
Marten Seemann
dd8c590b13
add methods to add and remove reset tokens to the packet handler map
2019-03-08 18:09:37 +09:00
Marten Seemann
759cd289c9
accept stateless resets for connection with zero-length connection IDs
2019-03-08 18:08:09 +09:00
Marten Seemann
02e851bd11
cut coalesed packets in the session
2019-02-27 10:03:34 +09:00
Marten Seemann
28ed85b9c6
move cutting of coalesced packets to the wire package
2019-02-23 10:24:42 +08:00
Marten Seemann
bb185a3ad2
add a function to close the packet handler map
...
Close will close the underlying connection and wait until listen has
returned. While not strictly necessary in production use, this will fix
a few race conditions in our tests.
2019-01-24 18:09:46 +07:00
Jan Rüth
1a0aa50471
delete unused connections from the multiplexer
2019-01-14 11:33:14 +07:00
Marten Seemann
73c4391a96
don't log Initial packets in the packet handler map
2019-01-05 16:16:58 +07:00
Marten Seemann
5d535166ca
fix logging of coalesced packets
2019-01-01 16:51:45 +07:00
Marten Seemann
99b1e50722
fix length check for too short packets
2019-01-01 11:37:09 +07:00
Marten Seemann
b32fb438af
make putting back packet buffers a member function of packetBuffer
2019-01-01 09:50:35 +07:00
Marten Seemann
d3ea7c0c4c
implement handling of coalesced packets
2019-01-01 09:50:35 +07:00
Marten Seemann
6ce7a204fc
move cutting of packets with a length to the packet handler map
2019-01-01 09:50:35 +07:00
Marten Seemann
767dbdd545
put back packet buffers after processing a packet
...
This introduces a reference counter in the packet buffer, which will be
used to process coalesced packets.
2019-01-01 09:50:29 +07:00
Marten Seemann
afdf9680e1
fix deadlock when handling packets
2018-11-27 18:45:22 +07:00
Marten Seemann
c5ca6fd7e5
parse the extended header in the session
2018-11-26 15:57:54 +07:00
Marten Seemann
b740d57c61
embed the Header in the ExtendedHeader
2018-11-26 15:57:54 +07:00
Marten Seemann
af157408de
move parsing of extended headers to the same file as the struct
2018-11-26 15:57:54 +07:00
Marten Seemann
9bcedd988d
move parsing of version negotiation packets to the wire.Header
2018-11-26 15:57:54 +07:00
Marten Seemann
7b91ba56b6
rename the wire.InvariantHeader to Header
2018-11-26 15:57:54 +07:00
Marten Seemann
cef26922b4
when parsing the header from the invariant header, start from first byte
...
This will be needed once we implement header encryption, because the
flags in the first byte are encrypted.
2018-11-26 15:57:54 +07:00
Marten Seemann
902853784b
remove unused perspective from header parsing
2018-11-26 11:14:39 +07:00