Commit graph

253 commits

Author SHA1 Message Date
Marten Seemann
d8858d767d don't retransmit PING frames added to ACK-only packets
Every 20 non-ack-eliciting packets, we add a PING frame to make that
packet ack-eliciting. That way, we regularly receive acknowledgements,
even if we're not actually sending any data. This allows us to clean up
our sent packet history.
There's no need to retransmit this PING frame though. We'll just send a
new one if one of them is lost, as soon as we've sent another 20
non-ack-eliciting packets.
2020-12-17 11:36:02 +07:00
Marten Seemann
231bc918d4 implement packing of DATAGRAM frames 2020-12-09 15:31:23 +07:00
Marten Seemann
192bc8dc2a account for the size of the header when packing 1-RTT probe packets 2020-11-17 13:08:06 +07:00
Marten Seemann
d1a784d092 use PADDING frames to pad Initial packets 2020-11-15 10:03:14 +07:00
Marten Seemann
0c2f562411 allow an amplification factor of 3.x 2020-11-06 14:16:11 +07:00
Marten Seemann
459fa5d19b pad datagrams containing ack-eliciting Initial packets from the server 2020-10-25 14:43:57 +07:00
Marten Seemann
27f569e2c9 refactor padding of packets in the packet packer 2020-10-25 13:40:22 +07:00
Marten Seemann
55a07c34ee add the exhaustive linter 2020-10-05 13:47:57 +07:00
Marten Seemann
bbd9fa4862 remove the EncryptionUnspecified enum value 2020-10-05 13:17:06 +07:00
Marten Seemann
876ab1d531 introduce a function to distinguish between IPv4 and IPv6 addresses 2020-09-14 17:01:34 +07:00
Marten Seemann
d4181c55af fix missing OnLost callback for frames sent in 0-RTT packets 2020-08-20 14:59:10 +07:00
Marten Seemann
2e46110d60 increase the packet size of the client's Initial packet 2020-07-01 14:01:06 +07:00
Marten Seemann
9177500096 bundle ACK frames when packing a packet 2020-06-01 09:56:06 +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
88337ed8c0 fix packing of probe packets when retransmissions are canceled 2020-04-17 10:06:42 +07:00
Marten Seemann
9dec939784
Merge pull request #2432 from lucas-clemente/max-udp-payload-size
rename the max_packet_size transport parameter to max_udp_payload_size
2020-03-23 16:21:03 +07:00
Marten Seemann
d0b5da8aa1 rename the max_packet_size transport parameter to max_udp_payload_size 2020-03-21 11:12:43 +07:00
Marten Seemann
09e16b7602 add the APPLICATION_ERROR, use it in CONNECTION_CLOSE frames 2020-03-21 10:56:36 +07:00
Marten Seemann
0ef4f06189 move the transport parameters from the handshake to the wire package 2020-03-13 16:20:11 +07:00
Marten Seemann
9c917fdb39 pad short Long Header packets to 4 bytes
This is required for header protection to work.
2020-03-02 21:46:35 +07:00
Marten Seemann
fb65a017ac use shorter packet numbers on Long Header packets 2020-02-26 11:26:15 +07:00
Marten Seemann
2ea6a294a9 send the CONNECTION_CLOSE in all available encryption levels 2020-02-25 17:10:44 +07:00
Marten Seemann
ebe3c1cca4 pad the client's Initial packets outside of the QUIC packet
This allows us to send coalesced packets of Initial and 0-RTT.
2020-02-24 13:57:54 +07:00
Marten Seemann
7a532326ec don't pack ACK frames in the second part of a coalesced packet
This prevents a possible overflow of the maximum packet size if the ACK
frames ends up being really large.
2020-02-20 16:42:58 +07:00
Marten Seemann
db7fc0eb02 simplify packing of Initial and Handshake packets 2020-02-20 16:42:58 +07:00
Marten Seemann
29b784e782 rename packet packing functions in the packet packer 2020-02-20 16:42:58 +07:00
Marten Seemann
5aad7cae5d send coalesced packets 2020-02-20 16:42:56 +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
077504f557 refactor sealing of packets 2020-02-20 16:19:08 +07:00
Marten Seemann
a4b4d52063 refactor packing of packets before and after the handshake is confirmed 2020-02-20 16:19:08 +07:00
Marten Seemann
b031615db5 export a qlog when the session's run loop stops 2020-02-12 10:42:37 +07:00
Marten Seemann
afbf5efd01 don't force 0-RTT packets to use 4 byte packet numbers 2020-01-01 18:04:02 +04:00
Marten Seemann
c79dfe77b8 implement packing of 0-RTT packets 2020-01-01 18:04:02 +04:00
Marten Seemann
fbbe225719 implement a function to pack probe packets 2019-11-12 11:27:30 +07:00
Marten Seemann
5f14b03135 refactor packet packer 2019-11-12 11:27:30 +07:00
Marten Seemann
772ffd3d20 use the connection ID manager to save the destination connection ID 2019-11-05 10:59:21 +07:00
Marten Seemann
ab2b26a5cb add the unparam linter 2019-09-17 13:44:05 +07:00
Marten Seemann
f49451ce3c queue lost STREAM frames in the stream's retransmission queue 2019-08-31 17:36:16 +07:00
Marten Seemann
e622207822 assemble ackhandler.Frames, not wire.Frames, when packing a packet 2019-08-31 17:34:54 +07:00
Marten Seemann
1d392b4276 retransmit frames instead of packets 2019-08-29 15:00:10 +07:00
Marten Seemann
515c21dd1d simplify splitting of STREAM frames 2019-08-29 11:15:59 +07:00
Marten Seemann
0c85e0eab9 remove unused PacketType field from the ackhandler.Packet 2019-08-21 14:49:00 +07:00
Marten Seemann
9221149194 simplify how the largest acked is passed to the ackhandler 2019-08-21 14:40:38 +07:00
Marten Seemann
fc77dee22d add a bug check for consistent payload length in the packet packer 2019-08-10 14:57:39 +07:00
Marten Seemann
1f950da751 fix calculation of the length of retransmitted STREAM frames 2019-08-10 14:57:13 +07:00
Marten Seemann
0ce749b5f1 pack ACK-only packets for all encryption levels 2019-07-01 07:19:47 +07:00
Marten Seemann
5a9c593463 rename the KeyPhase to KeyPhaseBit 2019-06-30 17:36:09 +07:00
Marten Seemann
0333f424bb
Merge pull request #1959 from lucas-clemente/optimize-crypto-packet-sending
optimize sending of crypto packets
2019-06-29 00:03:12 +08:00
Marten Seemann
c3142f9dc3 only try packing crypto packets before the handshake is confirmed 2019-06-25 14:31:34 +08:00
Marten Seemann
d6d1286d91 remove stray error check in packet packer 2019-06-23 14:00:26 +08:00