Commit graph

385 commits

Author SHA1 Message Date
Marten Seemann
b0ab718c7a delete non-forward-secure retransmissions when the handshake completes 2018-01-09 17:16:27 +07:00
Marten Seemann
3e2faa45a6 refactor sending such that session.sendPacket only sends one packet 2018-01-09 16:42:44 +07:00
Marten Seemann
46384c4845 refactor sending of ACK-only packets in a separate function
No functional change expected.
2018-01-09 16:42:44 +07:00
Marten Seemann
f8e5a13c7d use a gomock congestion in tests 2018-01-09 16:42:44 +07:00
Marten Seemann
b687dd774f remove the Range method in the streamsMap
streamsMap.Range was only used to pass the stream flow control window to
all open streams after receiving the peer's transport parameters. It's
easier to pass the transport parameters to the streamsMap directly.
2018-01-03 16:18:53 +07:00
Marten Seemann
8a3f807a12 immediately delete a stream when it is completed
By introducing a callback to the stream, which the stream calls as soon
as it is completed, we can get rid of checking every single open stream
if it is completed.
2018-01-03 10:30:20 +07:00
Marten Seemann
091b6b2602
Merge pull request #1087 from lucas-clemente/remove-non-forward-secure-dialing
remove non forward-secure dialing
2018-01-02 23:48:00 +07:00
Marten Seemann
99a2853e7d remove non forward-secure dialing
This was broken for a long time, and won't be available when using the
TLS 1.3 handshake.
2018-01-02 23:26:55 +07:00
Marten Seemann
d9c107b034 introduce a queue of active streams in the streamFramer
The queue holds all streams that have data to send. When stream.Write or
stream.Close are called, a stream is added to this queue. It is removed
from the queue when all available (at that moment) data was sent.
This way, we don't need the round robin scheduling (which, for every
packet sent, asked every single open stream if it had data) any more.
2018-01-02 23:24:44 +07:00
Marten Seemann
d195085f65 don't queue the complete window update, but only the stream ID 2017-12-21 19:03:52 +07:00
Marten Seemann
c270de3538 queue stream window updates directly from stream.Read
By queueing receive window updates directly from stream.Read, it is no
longer necessary to ask every stream for window updates when sending a
packet.
2017-12-20 13:03:36 +07:00
Marten Seemann
d2e31c04ab generate the streamI mock in the quic package
By doing so, we can mock private methods of the stream, so they cannot
be type-asserted by users of quic-go.
2017-12-20 10:42:07 +07:00
Marten Seemann
092908d3e0 simplify sending of (connection-level) BLOCKED frames 2017-12-20 10:23:17 +07:00
Marten Seemann
e926b0805a split the stream into a receive and a send stream 2017-12-20 10:05:02 +07:00
Marten Seemann
a0c4e28485 send and handle STOP_SENDING frames (for IETF QUIC) 2017-12-16 09:30:07 +07:00
Marten Seemann
2c83c9e3f0 don't send STOP_WAITING frames (for IETF QUIC) 2017-12-14 23:14:05 +07:00
Marten Seemann
bb093d82f1
Merge pull request #1025 from lucas-clemente/fix-964
ignore STOP_WAITINGs, derive lower bound for packets to include in ACK
2017-12-14 19:38:28 +07:00
Marten Seemann
8e0060c51b ignore STOP_WAITINGs, derive lower bound for packets to include in ACK 2017-12-14 19:23:06 +07:00
Marten Seemann
8c5741ae79 rename stream.Cancel to stream.CloseForShutdown 2017-12-14 17:30:44 +07:00
Marten Seemann
03977c1a25 pass RST_STREAM frames directly to the stream 2017-12-14 17:00:41 +07:00
Marten Seemann
2d31440510 pass MAX_STREAM_DATA frames directly to the stream 2017-12-14 16:50:47 +07:00
Marten Seemann
823098d6e2 rename stream.AddStreamFrame to stream.HandleStreamFrame 2017-12-14 16:50:47 +07:00
Marten Seemann
8833e4f4af use a gomock ReceivedPacketHandler in the session tests 2017-12-14 12:28:40 +07:00
Marten Seemann
5c7fb54445 use a gomock SentPacketHandler in the session tests 2017-12-14 12:28:40 +07:00
Marten Seemann
bd77f3081c directly queue RST_STREAM frames on stream.Reset 2017-12-13 17:40:46 +07:00
Marten Seemann
8e1f62f749 when forcing a retransmittable packet, bundle the PING with other frames
We're sending a retransmittable packet every 20 packets (if there are no
other frames to send). To make a packet retransmittable, we add a PING
frame. We should bundle this PING with an ACK.
2017-12-12 23:10:43 +07:00
Marten Seemann
73ab97aa95 simplify the stream by directly popping STREAM frames from it 2017-12-12 18:48:08 +07:00
Marten Seemann
b75e1df4f0
Merge pull request #1011 from lucas-clemente/crypto-stream-is-special
remove unneeded function from the crypto stream interface
2017-12-12 18:40:12 +07:00
Marten Seemann
cd5e7ae177 remove unneeded function from the crypto stream interface 2017-12-12 18:30:08 +07:00
Marten Seemann
16d610417b don't send every MAX_{STREAM}_DATA twice 2017-12-12 18:06:55 +07:00
Marten Seemann
dfa2181657 reject RST_STREAM frames for the crypto stream 2017-12-12 17:37:15 +07:00
Marten Seemann
81e13e52fd reject STREAM frames that would close the crypto stream 2017-12-12 17:37:15 +07:00
Marten Seemann
5a36a287de handle MAX_STREAM_DATA frames for the crypto stream 2017-12-12 17:36:59 +07:00
Marten Seemann
8e8892b064 remove the SentFin method from the stream
When a FIN is dequeued from the stream by the streamFramer, it is
guaranteed to be sent out. There's no need to explicitely signal that to
the stream.
2017-12-08 14:05:16 +07:00
Marten Seemann
25a6dc9654 implement stateless handling of Initial packets for the TLS server 2017-12-08 08:45:54 +07:00
Marten Seemann
57c6f3ceb5 don't return the handshakeChan from the session constructor 2017-12-08 07:34:57 +07:00
Marten Seemann
f90029ef64 change ReceivedPacketHandler such that it can generate ACKs for packet number 0 2017-12-07 21:33:34 +07:00
Marten Seemann
a29acbf960 fix flaky Public Reset test 2017-12-07 18:21:43 +07:00
Marten Seemann
ad22ed9d16 disable connection migration
Connection migration is complicated: We need to verify the new path, and
reset the congestion controller. In the IETF draft, connection migration
is still work in progress.
2017-12-06 08:42:13 +07:00
Marten Seemann
dc8b547793 reject ACKs that ack packets with a higher encryption level 2017-11-12 15:05:14 +08:00
Marten Seemann
095c29dc2c drop support for QUIC 37 and 38 2017-11-07 00:23:53 +07:00
Marten Seemann
0f1f1c8d41 implement the MAX_DATA and MAX_STREAM_DATA frames
For gQUIC WINDOW_UPDATEs are converted to MAX_DATA and MAX_STREAM_DATA,
respectively.
2017-11-04 15:22:14 +07:00
Marten Seemann
a1a4f35096 send initial version in the CHLO, not the current version
This commit fixes two bugs:
1. In the CHLO, we need to send the initial QUIC version. It will differ
from the current version if version negotiation was performed.
2. The session setup was using the wrong version (current version, and
not the initial version), such that we would have sent the wrong version
in the TLS handshake as well.
2017-11-02 21:51:51 +07:00
Marten Seemann
aba1dd13ba only use little endian byte order for gQUIC 37 and 38
That way, when adding new non-gQUIC versions, they will use big endian.
2017-11-02 16:46:22 +07:00
Marten Seemann
4556ad01e5 use the new packet header for connections using TLS 2017-10-27 16:54:47 +07:00
Marten Seemann
5ee7b205c6 handle the crypto stream separately 2017-10-25 09:13:48 +07:00
Marten Seemann
282b423f7d pass the crypto stream to the crypto setup constructor
The crypto stream is opened during the session setup. Passing it to the
crypto setup directly helps simplify the constructor.
2017-10-25 09:13:47 +07:00
Marten Seemann
268c3859fc remove the flow control manager 2017-10-20 21:34:09 +07:00
Marten Seemann
e087ee7e9f handle WINDOW_UPDATEs for streams and connection separately
In IETF QUIC, stream 0 is a valid stream ID, and is not used to encode
WINDOW_UPDATEs for the connection any more.
2017-10-20 21:12:19 +07:00
Marten Seemann
f3e9bf4332 remove the params negotiator 2017-10-20 18:08:21 +07:00