Marten Seemann
5140addd8a
don't send an ACK when receiving a packet that wouldn't be acked
...
There's a lower bound which packets get acknowledged in an ACK frame.
When receiving a packet smaller than that bound, which was reported
missing before, it's not necessary to immediately queue an ACK, since it
wouldn't be included in the ACK frame anyway.
2018-05-01 12:32:44 +09:00
Lucas Clemente
5907bfa168
Fix KEX test on windows
...
This makes the code rotate the key if `time.Since(kexCurrentTime) == kexLifetime`, which prevents an issue with low-resolution clocks (e.g. in our appveyor tests).
2018-04-30 11:14:46 +02:00
Lucas Clemente
0d8f0be92b
Fix unnecessary stack growth when parsing frames
2018-04-30 10:28:18 +02: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
596ef35a80
implement parsing and writing of the Payload Length Long Header field
2018-04-23 17:39:03 +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
b1de5df2f8
Merge pull request #1311 from lucas-clemente/fix-1302
...
limit the size of the ACK frame
2018-04-23 17:23:52 +09:00
Marten Seemann
cb0395ae37
Merge pull request #1316 from lucas-clemente/fix-1310
...
implement PATH_CHALLENGE and PATH_RESPONSE frames
2018-04-23 17:13:39 +09:00
Marten Seemann
126de06cc0
Merge pull request #1320 from lucas-clemente/fix-vnp-logging
...
fix logging of version negotiation packets
2018-04-23 17:00:25 +09:00
Marten Seemann
f353658547
limit the size of an ACK frame to 1000 bytes
2018-04-23 16:44:39 +09:00
Marten Seemann
4891b65c4b
refactor calculation of ACK ranges into a separate function
2018-04-23 16:44:38 +09:00
Marten Seemann
83b670841a
Merge pull request #1318 from lucas-clemente/fix-1317
...
fix flaky key exchange generation test on AppVeyor
2018-04-23 16:41:30 +09:00
Marten Seemann
108e574581
implement parsing and writing of the PATH_RESPONSE frame
2018-04-23 16:41:06 +09:00
Marten Seemann
f53f3eee9f
implement parsing and writing of the PATH_CHALLENGE frame
2018-04-23 16:41:06 +09:00
Marten Seemann
804eac7348
fix logging of version negotiation packets
2018-04-23 16:37:59 +09:00
Marten Seemann
cd359ec5e0
change the type byte of the IETF ACK frame from 0x0e to 0x0d
2018-04-23 15:57:50 +09:00
Marten Seemann
fae32101a0
use different source and destination connection IDs
2018-04-23 15:23:01 +09:00
Marten Seemann
118509cf76
fix flaky key exchange generation test on AppVeyor
2018-04-22 18:36:22 +09:00
Marten Seemann
c1d8c8940e
Merge pull request #1306 from lucas-clemente/new-header
...
implement the new IETF QUIC packet header
2018-04-19 18:15:15 +09:00
Marten Seemann
1ec873f917
use binary search to check if an ACK acks a packet
2018-04-19 17:36:12 +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
74ccd194f7
remove the omit_connection_id TLS transport parameter
2018-04-19 13:47:02 +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
1a035a265c
change the type of Connection ID to byte slice
2018-04-18 22:41:24 +09:00
Marten Seemann
52c3e6e863
remove the {Lowest, Largest}Acked from the ACK frame
...
All ACK ranges are now saved in the AckRanges slices. This eliminates a
bunch of special cases for ACKs that don't report any packets missing.
2018-04-18 13:19:42 +09:00
Marten Seemann
7de877fc3f
remove duplicate test cases for the legacy ACK frame
2018-04-18 12:25:26 +09:00
Marten Seemann
ca896f953a
rename AckRange.{First, Last} to AckRange.{Smallest, Largest}
2018-04-18 12:25:26 +09:00
Marten Seemann
af8971d8c9
move connection ID generation from the utils to the protocol package
2018-04-17 20:21:06 +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
c828742cde
Merge pull request #1300 from lucas-clemente/prior-in-flight
...
call OnPacket{Acked, Lost} with the bytes in flight prior to event
2018-04-17 19:18:25 +09:00
Marten Seemann
6f2e568416
Merge pull request #1297 from lucas-clemente/move-rto-calculation
...
move calculation of RTO delay to the sent packet handler
2018-04-17 19:15:12 +09:00
Marten Seemann
90d2ac72bd
call OnPacket{Acked, Lost} with the bytes in flight prior to event
2018-04-16 18:03:50 +09:00
Marten Seemann
2b9b949855
move calculation of RTO delay to the sent packet handler
2018-04-16 11:18:14 +09:00
Marten Seemann
6bc93a00e2
simplify curve 25519 key generation
2018-04-16 10:11:38 +09:00
Marten Seemann
ba9106c1ab
compute handshake timeout based on the time of the last handshake packet
2018-04-05 14:39:58 +07:00
Marten Seemann
605607d39b
implement spurious RTO detection
2018-04-04 17:47:29 +07:00
Marten Seemann
42d35360bb
only delete the acked packet, but none of its retransmissions
2018-04-04 15:35:23 +07:00
Marten Seemann
0652eb97a0
add some debug log statements when queueing packets as retransmissions
2018-04-04 14:25:16 +07:00
Marten Seemann
948eef3e42
create a logger interface and use it everywhere
2018-04-04 13:03:28 +07:00
Marten Seemann
1e9b3f0bb2
simplify writing of the gQUIC Version Negotiation Packet
2018-04-04 13:03:22 +07:00
Marten Seemann
5e82335005
Merge pull request #1264 from lucas-clemente/ietf-quic-no-trial-decrypt
...
don't do trial decryption for IETF QUIC
2018-04-03 17:17:31 +07:00
Marten Seemann
d4b67d9d6c
Merge pull request #1248 from lucas-clemente/fix-1247
...
allow empty STREAM frames at offset 0
2018-04-03 16:40:13 +07:00
Marten Seemann
efce19de55
Merge pull request #1270 from lucas-clemente/fix-1269
...
implement draft-10 changes for QHKDF-Expand
2018-04-03 16:19:40 +07:00
Marten Seemann
ae8d0808cf
Merge pull request #1274 from lucas-clemente/remove-unused-packet-method
...
remove unused method from the ackhandler.Packet
2018-04-03 16:19:02 +07:00
Marten Seemann
294df18d5f
Merge pull request #1272 from lucas-clemente/genny-linkedlist
...
use Genny to generate typed lists, based on Go standard library code
2018-04-03 16:18:37 +07:00
Marten Seemann
36dbb3477f
Merge pull request #1266 from lucas-clemente/fnv128a
...
use the FNV 128a from the standard library
2018-04-03 16:18:04 +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
c6526ad927
replace the SetDiversificationNonce crypto setup method by a chan
2018-03-31 14:29:44 +07:00