Commit Graph

1786 Commits

Author SHA1 Message Date
Benjamin Saunders 97bf76a5aa Defend against spoofed key updates by precomputing keys 2019-11-25 15:08:39 +01:00
Benjamin Saunders 9ea837c3e2 Add missing NEW_CONNECTION_ID validation cases 2019-11-25 15:08:39 +01:00
Benjamin Saunders 773972815d Validate token populatedness 2019-11-25 15:08:39 +01:00
Benjamin Saunders 93f2329974 Validate stream offsets wrt. maximum 2019-11-25 15:08:39 +01:00
Benjamin Saunders 63bf72c26e Discard Retry packets with illegal source CID 2019-11-25 15:08:39 +01:00
Benjamin Saunders fc7334d8d9 Rename handle_connected_inner to process_decrypted_packet
This more accurately reflects the role it's arrived at.
2019-11-25 15:08:39 +01:00
Benjamin Saunders d01f31db4c Support multi-packet first flights 2019-11-25 15:08:39 +01:00
Benjamin Saunders a91553c8fe Validate reserved bits in initial packets 2019-11-25 15:08:39 +01:00
Benjamin Saunders 3b850c1fd3 Style tweak 2019-11-25 15:08:39 +01:00
Benjamin Saunders b639f308cc Only check reset tokens from legitimate addresses 2019-11-25 15:08:39 +01:00
Benjamin Saunders 2a24440c06 Ensure temporary retry CIDs don't collide with existing connections
Collisions with future connections are still possible, but unlikely,
and are difficult to prevent without defeating the point of stateless
retries.
2019-11-25 15:08:39 +01:00
Benjamin Saunders d2bb7f76f0 Update comment 2019-11-25 15:08:39 +01:00
Benjamin Saunders 0e10a0de0c CONNECTION_CLOSE is no longer ack-eliciting 2019-11-25 15:08:39 +01:00
Benjamin Saunders 29288aed19 Path challenges and datagrams are ack-eliciting too 2019-11-25 15:08:39 +01:00
Benjamin Saunders 575de71226 s/ack_only/ack_eliciting/ for clarity 2019-11-25 15:08:39 +01:00
Benjamin Saunders 8d9a9e1ae1 Update EndpointConfig::local_cid_len documentation 2019-11-25 15:08:39 +01:00
Benjamin Saunders 9522b44600 Remove quinn-proto rustls config newtypes
These were not successful at removing rustls from our public API, and
made specifying custom cryptographic configurations
unintuitive. Removing them reduces the scope of our public API while
preserving the friendliness of the high-level quinn API.
2019-11-23 20:20:54 +01:00
Demi Obenour 3230678055 Expose the peer address of a Connecting (#517)
Expose the peer address of a `Connecting`
2019-11-21 16:03:24 -08:00
Benjamin Saunders 5dc8f22f24 Don't create new connections if we're running low on connection IDs 2019-11-21 21:26:07 +01:00
Benjamin Saunders 8d178f94da Remove subcrate-specific profile config
Cargo ignores these.
2019-11-21 21:26:07 +01:00
Demi M. Obenour 03a1b5b451 Fix the hyper upstream repository
Otherwise `cargo update` fails.

Fixes #514
2019-11-21 21:24:39 +01:00
Dirkjan Ochtman 63565701a7 Prevent use of problematic array::into_iter() 2019-11-21 07:42:44 -08:00
Benjamin Saunders 9b0f175223 Use sendmmsg to reduce system call overhead 2019-11-21 11:26:36 +01:00
Benjamin Saunders bc813f7713 Include debug info in release builds for easier profiling
This shouldn't affect downstream crates.
2019-11-21 09:07:36 +01:00
Benjamin Saunders 3ffa250b35 Add minimal self-contained benchmark for easy profiling 2019-11-21 09:07:36 +01:00
Benjamin Saunders 4902bfe6ba Use anyhow instead of failure in examples
Anyhow was already in our depgraph and is more modern and actively
maintained.
2019-11-19 11:46:43 -08:00
Benjamin Saunders 9523457c59 Remove nightly-only rustfmt.toml
This spams errors on `cargo fmt` under stable, unfortunately.
2019-11-19 20:01:49 +01:00
Benjamin Saunders 93690aa4c9 Fix buggy non-async-style tracing span in server example 2019-11-19 20:01:49 +01:00
Timon Post 9cb793a770 added pub (crate) 2019-11-19 08:11:08 -08:00
Benjamin Saunders ecede30442 Validate datagram size limit after 0-RTT 2019-11-19 08:29:57 +01:00
Benjamin Saunders f18b95bbd7 Move 0-RTT transport param validation to helper method 2019-11-19 08:29:57 +01:00
Timon Post ac810125c1 merge imports 2019-11-19 08:23:35 +01:00
Dirkjan Ochtman 235dbe44f2 Implement key updates without rustls support 2019-11-18 10:07:18 -08:00
Benjamin Saunders 3c3d69b582 Don't increase the congestion window unless it was full
Prevents unbounded congestion window growth during periods of low
activity wrt. link capacity.
2019-11-18 09:34:19 +01:00
Benjamin Saunders f33a4841b5 Simplify congestion_blocked predicate 2019-11-18 09:34:19 +01:00
Benjamin Saunders 375f9b6ae8 Borrowing datagram futures
ConnectionRef::clone was 7% of runtime for the small datagram
benchmark.
2019-11-17 07:12:27 +01:00
Benjamin Saunders 3f36be64af Drop truncated UDP packets
These would fail decryption anyway, so this saves us some CPU.
2019-11-17 07:10:51 +01:00
Benjamin Saunders 76875b7af5 Remove lingering uses of FNV hashing 2019-11-16 15:12:35 -08:00
Benjamin Saunders d7e43be6dd Replace webpki-roots with optional native certificate store use 2019-11-16 21:58:49 +01:00
Benjamin Saunders da08f06e35 More robust local_addr test 2019-11-16 20:17:59 +01:00
Benjamin Saunders ec576047e0 Benchmark packet-sized application datagrams 2019-11-16 20:17:59 +01:00
stammw 16c3f25eef Clippy fixes 2019-11-15 20:29:55 +01:00
stammw 06db4fb757 H3: fix freshly type-resolved incoming uni streams handling 2019-11-15 20:29:55 +01:00
stammw a8eb51b01c H3: Fix driver polling story trivially 2019-11-15 20:29:55 +01:00
Benjamin Saunders e3697534de Address come clippy issues 2019-11-09 15:47:17 +01:00
Benjamin Saunders 1dc72758b0 Switch CI back to stable 2019-11-09 15:47:17 +01:00
Benjamin Saunders f2c44bb304 Only check for initial CID in initial packets 2019-11-02 21:12:17 +01:00
Benjamin Saunders b681f52ab6 Remove fnv hash
This had no visible performance benefit and may have created a HashDoS
vulnerability.
2019-11-02 21:12:17 +01:00
Benjamin Saunders f91df78e77 Tweak benchmarks
Improves comparison between streams and datagrams
2019-11-02 21:11:33 +01:00
stammw cf2c46abd9 H3: move ErrorCode to proto 2019-10-30 21:33:11 +01:00