Commit Graph

1896 Commits

Author SHA1 Message Date
Jan Rüth
6a0b2d04d6 Added tests to check if PUBS is invalid and made sure a valid PUBS is requested by default 2017-05-11 21:15:52 +02:00
Jan Rüth
f558bdebed Added parsing of PUBS tag and filtering according to KEXS
This now allows quic-go to contact servers announcing multiple KEXS methods, e.g. like Akamai.
2017-05-11 19:54:49 +02:00
Marten Seemann
6628994883 Merge pull request #610 from lucas-clemente/fix-609
fix a race condition in the client crypto setup
2017-05-11 23:25:51 +08:00
Marten Seemann
adc4ef464a simplify the CryptoSetup.SetDiversificationNonce interface
Pass the diversification nonce via a channel instead of setting it
directly. That way there is no need to protect the diversificationNonce
member by a mutex. Also prevents a possible deadlock that occurred when
SetDiversificationNonce was called before maybeUpgradeCrypto returned.
2017-05-11 21:56:41 +08:00
Marten Seemann
8c4fe4ff80 fix race when setting the diversification nonce in clientCryptoSetup 2017-05-11 21:56:35 +08:00
Marten Seemann
df5ce0f6ae print handshake messages in sorted order
The sorting is not alphabetical, but by tag value. While this is not
perfect, it makes comparing two messages easier, since the values don’t
appear in random order.
2017-05-11 21:31:33 +08:00
Marten Seemann
acbd14f940 implement a HandshakeMessage struct
This makes passing handshake messages around easier, since it’s now one
struct instead of one message tag and one data map.
2017-05-11 21:31:31 +08:00
Marten Seemann
77c4d6aa4e remove unused TeeReader in cryptoSetupClient 2017-05-10 18:58:48 +08:00
Marten Seemann
fe364bfe07 Merge pull request #608 from lucas-clemente/better-close
send ConnectionCloses and PublicReset from the session run loop
2017-05-10 18:57:01 +08:00
Marten Seemann
69d5f3c262 send ConnectionCloses and PublicReset from the session run loop
This avoids several race conditions that can occur when trying to pack
packets and to write to the underlying connection concurrently.
2017-05-10 15:38:40 +08:00
Marten Seemann
75308ab56e improve runClosed channel semantics in session 2017-05-10 11:32:57 +08:00
Marten Seemann
db8fb356bc Merge pull request #595 from lucas-clemente/remove-handshake-complete
replace CryptoSetup.HandshakeComplete() by closing the aeadChanged channel
2017-05-09 19:36:17 +08:00
Marten Seemann
86c408e4bc Merge pull request #604 from lucas-clemente/fix-603
fix flaky session test
2017-05-09 18:59:00 +08:00
Marten Seemann
8a0ab02c6c Merge pull request #602 from lucas-clemente/fix-546
fix flaky session test
2017-05-09 18:51:09 +08:00
Marten Seemann
ab613c3ab0 use a directed aeadChanged chan in the session 2017-05-09 18:42:49 +08:00
Marten Seemann
3a357369b0 use a directed aeadChanged chan in the crypto setups 2017-05-09 18:41:40 +08:00
Marten Seemann
0a6a9551f8 close the aeadChanged chan when the handshake completes
This allows us to remove HandshakeComplete() from the CryptoSetup
interface. It also provides a signal to the session when the handshake
completes.
2017-05-09 18:40:23 +08:00
Marten Seemann
2e0f5473a0 Merge pull request #577 from lucas-clemente/fix-565
add a quic.Config option for QUIC versions
2017-05-09 18:30:04 +08:00
Marten Seemann
643f9df62b Merge pull request #594 from lucas-clemente/crypto-setup-races
fix minor data races in both server and client crypto setups
2017-05-09 18:27:35 +08:00
Marten Seemann
fd99c83591 Merge pull request #599 from lucas-clemente/fix-598
fix infinite loop in session test
2017-05-09 18:27:16 +08:00
Marten Seemann
e9db78ace3 fix flaky session test
fixes #603
This test can be simplified (and made race-free) by using that
session.run() now returns an error.
2017-05-09 14:43:18 +08:00
Marten Seemann
fc4e49b1c1 fix flaky session test
fixes #546
2017-05-09 14:14:38 +08:00
Marten Seemann
ab88e9472d fix infinite loop in session test
fixes #598
The mockReceivedPacketHandler returned the same ACK frame over and over
again, so that the loop in session.sendPacket() would send packets
containing this packet indefinitely.
2017-05-09 12:15:21 +08:00
Marten Seemann
2014ced934 fix data race in client crypto setup 2017-05-06 23:44:15 +08:00
Marten Seemann
b3419633a6 fix data race in server crypto setup 2017-05-06 23:43:43 +08:00
Marten Seemann
a5a41d06e6 add a Changelog entry for the Versions quic.Config option 2017-05-05 18:07:17 +08:00
Marten Seemann
55fa713eac simplify the signature of the version selection 2017-05-05 18:07:17 +08:00
Marten Seemann
16ca3012e9 make it possible to configure the QUIC versions for the client 2017-05-05 18:07:11 +08:00
Marten Seemann
1b70bd42d9 read unsupported version numbers in version negotiation packets 2017-05-05 18:06:14 +08:00
Marten Seemann
9db23eceed reverse the order of the SupportedVersions slice
For the client, the Versions option in the quic.Config encodes the first
entry is the preferred version. If not set, this should default to the
highest supported version.
2017-05-05 18:06:14 +08:00
Marten Seemann
b305cd674f make it possible to configure the QUIC versions for the server 2017-05-05 18:05:57 +08:00
Marten Seemann
cc2dc2aded Merge pull request #587 from lucas-clemente/fix-425
close session if reading from the socket fails in the server
2017-05-05 16:49:01 +08:00
Lucas Clemente
fa12f3664d Merge pull request #582 from lucas-clemente/improve-ackhandler-logs
Improve ackhandler logs
2017-05-05 10:48:35 +02:00
Marten Seemann
f7f1ddf496 Merge pull request #591 from lucas-clemente/fix-readme-goget
fix go get command in README
2017-05-05 16:48:12 +08:00
Marten Seemann
b5ad169321 Merge pull request #586 from lucas-clemente/ginkgo-logfile-flag
introduce a logfile command line flag for the integrationtests
2017-05-05 16:40:25 +08:00
Marten Seemann
4f6e31a08b Merge pull request #572 from lucas-clemente/remove-closecallback
remove the closeCallback from the session
2017-05-05 16:31:16 +08:00
Marten Seemann
6f5c84b1da fix go get command in README
fixes #590
2017-05-05 16:23:31 +08:00
Marten Seemann
eacd994e67 close session if reading from the socket fails in the server
fixes #425
2017-05-04 13:15:20 +08:00
Marten Seemann
53583059d9 Merge pull request #578 from lucas-clemente/fix-session-flakiness
fix several flaky session tests
2017-05-04 13:03:01 +08:00
Marten Seemann
6263c07a49 fix several flaky session tests 2017-05-04 12:33:23 +08:00
Marten Seemann
a6f67c7e14 simplify error handling in the session 2017-05-03 14:07:53 +08:00
Marten Seemann
96e49b0c31 remove the closeCallback from the session
The closeCallback was run when a session was closed, i.e. after the run
loop of the session stopped. Instead of explicitely calling this callback
from the session, the caller of session.run() can just execute the code
after session.run() returns.
2017-05-03 14:06:47 +08:00
Marten Seemann
5f25ffc795 Merge pull request #580 from lucas-clemente/ginkgo-clienttest-timeouts
set ginkgo timeouts for client integrationtests
2017-05-03 11:33:32 +07:00
Lucas Clemente
2674c98359 Merge pull request #584 from mholt/patch-1
Make responseWriter a CloseNotifier
2017-05-02 08:37:03 +02:00
Matt Holt
65923b35f5 Make responseWriter a CloseNotifier
This is a temporary no-op that returns a new channel;
eventually it'd be nice if this worked for real.
2017-05-02 00:13:14 -06:00
Lucas Clemente
97ccb08f94 Merge pull request #581 from lucas-clemente/fix-stream-race
Fix a data race in stream.Read
2017-04-30 15:47:04 +02:00
Lucas Clemente
a2e079c052 Remove an unnecessary error return value 2017-04-30 15:32:01 +02:00
Lucas Clemente
5aba345811 Emit a debug log message when congestion limited 2017-04-30 15:32:01 +02:00
Lucas Clemente
a7c60e3229 Fix a data race in stream.Read 2017-04-30 15:30:31 +02:00
Marten Seemann
8b4042ddd1 introduce a logfile command line flag for the integrationtests
Use: ginkgo -failFast -- -logfile=log.txt
Ginkgo will create log.txt and set the log level to LogLevelDebug. Use
of -failFast is recommended to make sure that no other tests are run if
one test fails (the log file would be overwritten otherwise).
2017-04-30 15:13:29 +07:00