Benjamin Saunders
7965ed4449
Remove some unused dependencies
2019-01-10 06:48:20 +01:00
Dirkjan Ochtman
25306db57f
Update deprecated Handle instantiation method name
2019-01-09 18:08:19 -08:00
Benjamin Saunders
6ad9daddeb
Handle invalid and legitimately empty initial DCIDs
2019-01-09 04:58:19 +01:00
Benjamin Saunders
d52357eb5a
Remove unnecessary alloc/copy
2019-01-09 04:58:19 +01:00
Benjamin Saunders
cf49a002e9
Improve config documentation
...
Idle timeout limit was removed.
2019-01-09 04:58:19 +01:00
Benjamin Saunders
725d1c190c
Fix off-by-one stateless reset size threshold
...
This wasn't fully updated to draft 17, wherein the first byte is
counted as part of the padding.
2019-01-09 04:58:19 +01:00
Benjamin Saunders
2f16dc7a96
Don't route long-header packets based on remote
...
Fixes use of multiple connections from the same remote.
2019-01-09 04:58:19 +01:00
Benjamin Saunders
a996271090
Route packets to issued CIDs
2019-01-09 04:58:19 +01:00
Benjamin Saunders
9c847c2bff
Add tuning note to Config
2019-01-08 08:21:10 +01:00
Benjamin Saunders
6bf6b462ee
Permit incoming streams by default
...
This should reduce the odds of new user confusion at little cost.
2019-01-08 08:21:10 +01:00
Benjamin Saunders
2d8f87d1fa
Implement dynamic stream ID flow control
...
This allows applications to easily handle arbitrary numbers of streams
concurrently with predictable resource use.
2019-01-08 08:21:10 +01:00
Benjamin Saunders
8cd2564f8e
Improve high-level test debuggability
2019-01-08 08:21:10 +01:00
Benjamin Saunders
e8347a34ee
Rename Config::max_remote_streams_* to stream_window_*
2019-01-08 08:21:10 +01:00
Benjamin Saunders
c9d8f49704
Extract remotely initiated stream allocation method
2019-01-08 08:21:10 +01:00
Benjamin Saunders
d11dfb6206
Validate handshake source CIDs against a consistent reference
...
rem_cid is subject to change, e.g. if a migration is initiated while
handshake packets are still in flight.
2019-01-07 06:52:00 +01:00
Benjamin Saunders
170759319d
Use a consistent source CID for Initial/Handshake
...
A peer might retire CID 0 while there are still handshake packets in
flight, but that CID must still be used as the source if we want them
not to be dropped.
2019-01-07 06:52:00 +01:00
Benjamin Saunders
9e57ba0e08
Tweak diagnostics
2019-01-07 06:52:00 +01:00
Benjamin Saunders
d85ce6b7e4
Fix path validation timer
2019-01-07 06:52:00 +01:00
Benjamin Saunders
60f592b926
Correct lost_packets accounting, strengthen coalesced packet test
2019-01-07 06:52:00 +01:00
est31
916546ff8c
Use libc from crates.io
...
The git commit that libc had been pinned
to earlier has been part of a release since.
2019-01-06 17:40:58 +01:00
Benjamin Saunders
c9f0a23c2a
Handle path validation probes
2019-01-05 23:24:30 -08:00
Benjamin Saunders
ed35d048e6
Remove Event::NewSessionTicket
...
This is handled adequately by rustls by default, and rustls's
extension points are exposed if anyone really wants to e.g. use a
persistent cache.
2019-01-05 23:24:30 -08:00
Benjamin Saunders
86d5a3cd33
Remove non-retransmittable data from Retransmits
2019-01-05 23:24:30 -08:00
Benjamin Saunders
4dcff18d4f
Reset congestion/rtt state when migrating
2019-01-05 23:24:30 -08:00
Benjamin Saunders
092eae3666
Implement client address migration
2019-01-05 23:24:30 -08:00
Benjamin Saunders
74a6bc032c
Reduce duplication in timer cancellation handling
2019-01-05 23:24:30 -08:00
Benjamin Saunders
0c2006b982
Tweak diagnostics
2019-01-05 23:24:30 -08:00
Benjamin Saunders
a213eeaf1f
Test key update in interop tool
2019-01-06 07:56:09 +01:00
Benjamin Saunders
32b6dddaf4
Fix handling of early packet spaces after key update
...
Handshake and Initial packets do not have a key phase, so the key
phase test should always be ignored for them.
2019-01-06 07:56:09 +01:00
Benjamin Saunders
cbac404529
Mark resumption as working
2019-01-06 07:56:09 +01:00
Benjamin Saunders
31edd6c734
Test resumption in interop tool
...
We can infer whether the session was resumed based on whether we saw
the server's certificate.
2019-01-06 07:56:09 +01:00
Benjamin Saunders
05668af7b4
Fix IO polling panic when draining begins after IO is queued
...
If we closed the connection, then received a packet from the peer that
did not contain a CONNECTION_CLOSE, followed by one that did, we would
enter the Draining state with io.close = true, causing us to try to
send a CONNECTION_CLOSE packet after having forgotten the close
reason.
2019-01-05 06:14:24 +01:00
Benjamin Saunders
beaedb541b
Fix malformed resumption handshake
2019-01-05 06:14:24 +01:00
Benjamin Saunders
ce514af89a
Don't pad anti-deadlock packets
...
If the client manages to get a Handshake packet through to the server,
its address will be verified and anti-amplification budget becomes
irrelevant.
2019-01-04 11:46:44 +01:00
Benjamin Saunders
f94f0ec6a8
Ensure a closed or reset connection cancels its timers
...
Fixes a panic in the higher level.
2019-01-04 11:46:44 +01:00
Benjamin Saunders
24a7ef311e
Fix ChaCha20 header protection
2019-01-04 11:46:44 +01:00
Benjamin Saunders
8a1c61abeb
Tweak diagnostics
2019-01-04 11:46:44 +01:00
Benjamin Saunders
08e057ec39
Test handling of coalesced packets
2019-01-04 11:46:44 +01:00
Benjamin Saunders
7338f7b1e4
Fix panic on receiving 0-RTT headers
2019-01-04 11:46:44 +01:00
Benjamin Saunders
60bf13acff
Mark client Initial authenticated before processing for consistency
2019-01-04 11:46:44 +01:00
Benjamin Saunders
eef1ba31f7
Improve unsafe code defensiveness
2019-01-04 11:46:44 +01:00
Benjamin Saunders
58dd5daade
Fix feature-gated type reference
2019-01-04 01:22:55 -08:00
Benjamin Saunders
07384a920e
Add missing documentation
2019-01-04 01:22:55 -08:00
Benjamin Saunders
37c664ec0a
Fix copy-paste error
2019-01-04 01:22:55 -08:00
Benjamin Saunders
32b4ed7c8e
Hide rustls certificate types and parsing methods
...
This decouples an important part of the API from rustls, and greatly
simplifies the task of robustly reading a certificate from disk.
2019-01-03 23:10:22 -08:00
Benjamin Saunders
2aa8e30a64
Delete dead macro_use
2019-01-02 08:11:00 +01:00
Benjamin Saunders
3e7961ad37
Backwards-compatible IP_TOS sendmsg use
...
Linux required IP_TOS to be set as an int prior to 2016 kernel commit
e895cdce683161081e3626c4f5a5c55cb72089f8, even though it's a u8 when
read via IP_RECVTOS.
2019-01-02 08:11:00 +01:00
Benjamin Saunders
b5dbe2b602
Independently test IPv4, IPv6, and dual-stack connections
2019-01-02 08:11:00 +01:00
Benjamin Saunders
d47c8b8430
Don't send to IPv4 addrs on IPv6 sockets
...
This fixes dual-stack operation on less recent Linux kernels, and
reduces the rate of address conversion to once per connection by
assuming that dual-stack sockets will always yield IPv4-mapped IPv6
addresses.
2019-01-02 08:11:00 +01:00
Benjamin Saunders
15ce3f0be2
Handshake anti-deadlock
...
Servers may only send at most 3x received data until address
verification is complete, so large handshakes or packet loss may
require the client to send dummy packets.
2019-01-01 13:52:51 +01:00