Marten Seemann
903747fdc7
remove stray commented code in the session
2018-04-29 20:48:03 +09:00
Marten Seemann
1420b138d5
implement TLPs
2018-04-25 20:47:18 +09:00
Marten Seemann
0c014c0aff
fix deadlock when receiving two packets with diversification nonces
2018-04-24 21:14:58 +09:00
Marten Seemann
0e58a679d6
Merge pull request #1319 from lucas-clemente/fix-1307
...
use different source and destination connection IDs
2018-04-23 17:29:45 +09:00
Marten Seemann
e813d41376
handle PATH_CHALLENGE frames, reject PATH_RESPONSE frames
2018-04-23 16:41:06 +09:00
Marten Seemann
fae32101a0
use different source and destination connection IDs
2018-04-23 15:23:01 +09:00
Marten Seemann
d47124d14d
add more methods to the protocol.ConnectionID
...
This will make it easier to change the underlying type of the connection
ID (potentially an array is faster than a byte slice).
2018-04-19 16:08:06 +09:00
Marten Seemann
52d31dd7ef
implement the new header format
...
Currently, we're only sending and accepting packets with matching source
and destination connection IDs.
2018-04-19 13:46:54 +09:00
Marten Seemann
f052861775
only allow sending of retransmissions if these are RTO probe packets
2018-04-17 19:58:53 +09:00
Marten Seemann
a23c94dd87
fix race condition when the handshake completes
...
When the handshake completes, the crypto setup closes the handshakeEvent
channel. We need to make sure that the session run loop immediately
selects this case, and not any other case (especially the packet
reception case). Otherwise, the server crypto setup will deadlock,
because the sentSHLO channel won't be closed, and opening of
forward-secure packets will block indefinitely on that channel.
2018-04-16 13:36:06 +09:00
Marten Seemann
948eef3e42
create a logger interface and use it everywhere
2018-04-04 13:03:28 +07:00
Marten Seemann
302d2a1715
don't use trial decryption for IETF QUIC
2018-03-31 14:29:44 +07:00
Marten Seemann
6c1eba5848
generate the diversification nonce when creating the server crypto setup
2018-03-31 14:29:44 +07:00
Marten Seemann
69f6427d3c
refactor session to use a much smaller crypto setup
2018-03-31 14:29:44 +07:00
Marten Seemann
c6526ad927
replace the SetDiversificationNonce crypto setup method by a chan
2018-03-31 14:29:44 +07:00
Marten Seemann
2fbc994d29
move the unencrypted STREAM frame check from the unpacker to the session
2018-03-31 14:29:44 +07:00
Marten Seemann
fed3bf503e
keep track of which packets were sent as retransmissions
...
When an ACK for a packet that was retransmitted arrives, we don't need
to retransmit the retransmission, even if it was lost.
2018-03-16 16:54:39 +01:00
Marten Seemann
56720edc34
report retransmissions separately to the sent packet handler
2018-03-14 11:15:52 +01:00
Marten Seemann
555fa8ec8e
Merge pull request #1232 from lucas-clemente/packet-sending-modes
...
implement packet send modes to determine what kind of packets are sent
2018-03-13 17:39:20 +01:00
Marten Seemann
b5977236ff
implement packet send modes to determine what kind of packets are sent
2018-03-13 14:49:48 +01:00
Marten Seemann
9d18d30931
use the peer's max_packet_size when packing packets
2018-03-10 14:27:07 +07:00
Marten Seemann
6ccc76a130
send packets with maximum IPv4 and IPv6 packet size
2018-03-09 22:36:44 +07:00
Marten Seemann
abf57a5551
calculate the packet number length in the sent packet handler
2018-03-07 15:56:18 +07:00
Marten Seemann
ca2471e78d
remove explicit error for duplicate or out of order ACKs
2018-03-07 09:30:05 +07:00
Marten Seemann
5c98332e90
implement ACK decimation
...
ACK generation closely follows Chrome's QuicConnection::MaybeQueueAck()
in ACK_DECIMATION_WITH_REORDERING mode.
2018-03-05 19:56:19 +07:00
Marten Seemann
41d7cbb014
Merge pull request #1219 from lucas-clemente/max-tracked-error-check
...
remove incorrect error check when sending a packet
2018-03-05 19:34:00 +07:00
Marten Seemann
2d64953e0e
remove incorrect error check when sending a packet
...
There's no need for a check if more than protocol.MaxTrackedSentPackets
packets were sent. There are certain situations where we allow (via
SendingAllowed()) sending of more packets, and we shouldn't throw an
error when the session then actually sends these packets.
2018-03-05 17:08:18 +07:00
Marten Seemann
6f03b3a44a
refactor sending of retransmission in the session
2018-03-04 22:16:25 +07:00
Marten Seemann
656dff6163
introduce a UsesStopWaitingFrames() method for version numbers
2018-03-02 16:00:11 +07:00
Marten Seemann
ca7291e8cf
send retransmission as separate packets
2018-02-26 22:22:17 +08:00
Marten Seemann
11af98e338
run misspell in gometalinter
2018-02-23 22:39:08 +08:00
Marten Seemann
2f157769c0
Merge pull request #1197 from lucas-clemente/fix-523
...
make the number of incoming streams configurable
2018-02-23 22:37:25 +08:00
Marten Seemann
245af2c596
make the number of incoming streams configurable, for gQUIC
2018-02-23 22:15:31 +08:00
Marten Seemann
58b20c6009
make the number of incoming streams configurable, for IETF QUIC
2018-02-23 22:15:31 +08:00
Marten Seemann
8fd7219bfc
delete handshake packets from history when receiving a forward-secure packet
2018-02-23 22:15:10 +08:00
Marten Seemann
c65b1aca4e
Merge pull request #1187 from lucas-clemente/buffer-pool-pointer
...
use pointer to byte slices in the buffer pool
2018-02-23 20:50:24 +08:00
Marten Seemann
07b8821ef7
use pointer to byte slices in the buffer pool
...
https://staticcheck.io/docs/staticcheck#SA6002 suggests to use pointers
to objects in the sync.Pool.
2018-02-23 18:57:12 +08:00
Marten Seemann
26013b8d64
don't retransmit Initial packets after receiving the first packet
2018-02-23 17:57:42 +08:00
Marten Seemann
da49295b52
expose methods for opening and accepting unidirectional streams
2018-02-21 22:19:37 +08:00
Marten Seemann
0f334e000c
don't send an ACK frame for Retry packets
2018-02-18 14:17:51 +08:00
Marten Seemann
1ec720f2f2
implement sending of STREAM_ID_BLOCKED frames
2018-02-06 10:04:40 +08:00
Marten Seemann
46e20ce8c9
implement handling of MAX_STREAM_ID frames
2018-02-06 08:30:58 +08:00
Marten Seemann
02949853f7
use the new stream maps for the IETF QUIC streams map
2018-02-06 07:53:34 +08:00
Marten Seemann
3b82628dbe
internalize ackhandler and congestion
2018-02-02 08:40:56 +08:00
Marten Seemann
fbeba1f73a
make sure that at least every 20th ACK is retransmittable
...
This is important because we need to make sure that we can remove old
ACK ranges from the received packet history. The logic we implemented
before was not correct, since we only made sure that every 20th packet
would be retransmittable, but we didn't have any guarantee that this
packet would also contain an ACK frame.
2018-02-01 17:11:05 +08:00
Marten Seemann
9ef3a47da5
send multiple packets at once, if the pacing delay is very small
...
This is an optimization to avoid waking of the run loop every couple of
microseconds.
2018-01-23 09:13:44 +11:00
Marten Seemann
5ef89733ae
implement packet pacing
2018-01-21 14:27:37 +11:00
Marten Seemann
f33243fb41
Merge pull request #1114 from lucas-clemente/connection-state
...
expose the ConnectionState in the Session
2018-01-12 17:09:52 +07:00
Marten Seemann
9b3139a1d6
use the packet receive time in the receivedPacketHandler
...
By passing the packet receive time to the receivedPacketHandler we can
get rid of two time.Now() syscalls.
2018-01-12 11:30:39 +07:00
Marten Seemann
66fd3b5195
expose the ConnectionState in the Session
...
The ConnectionState contains basic details about the QUIC connection.
2018-01-11 16:27:42 +07:00