Commit Graph

3340 Commits

Author SHA1 Message Date
James Leitch e77cd3e33d Updates docs for Connection::accept_bi() and Connection::open_bi() 2023-11-10 21:49:56 +01:00
Nazar Mokrynskyi ca0fae8896 Downgrade duplicate packet message to debug level 2023-11-07 09:17:54 +01:00
Damien Deville ab280e467a proto: add a way to configure the minimum MTU change needed to stop
the binary search used during the MTU discovery phase.
2023-11-06 10:41:49 -08:00
Luís Neto 49aa4b61e0 #729: proto: write outgoing packets to caller-supplied memory (#1697) 2023-11-01 12:17:10 -07:00
Fabio Valentini 10f08e0652 ensure LICENSE files are present in all published crates 2023-10-28 17:26:10 +02:00
dependabot[bot] 6d80efeeae Update async-io requirement from 1.6 to 2.0
Updates the requirements on [async-io](https://github.com/smol-rs/async-io) to permit the latest version.
- [Release notes](https://github.com/smol-rs/async-io/releases)
- [Changelog](https://github.com/smol-rs/async-io/blob/master/CHANGELOG.md)
- [Commits](https://github.com/smol-rs/async-io/compare/v1.6.0...v2.0.0)

---
updated-dependencies:
- dependency-name: async-io
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-23 15:58:29 +02:00
vvvviiv 15222f2f5d Implement Debug for IdleTimeout.
Fix typo.
2023-10-23 13:42:40 +02:00
Michael Chen dd34d57a0a Make quinn-proto::{Connection, Endpoint} deterministic (#1691)
`quinn-proto::{Connection, Endpoint}` structs call
`StdRng::from_entropy()` in their implementation. It makes it hard to
reproduce errors in an otherwise deterministic test case.

This PR addresses the issue by adding a `StdRng` argument to the
respective `new` functions. For other functions that may create an
endpoint/connection, an argument of type `impl FnOnce() -> StdRng` is
added. This avoids eager calls to generate fresh entropy. e.g. the
`Endpoint::handle` function is frequently called but we'd only need the
rng when handling a new incoming connection.
2023-10-23 11:46:15 +02:00
Dirkjan Ochtman 7bd92f65aa Avoid redundant link target in docs 2023-10-23 11:42:54 +02:00
Dirkjan Ochtman 24212da394 Use or_default() as suggested by clippy 2023-10-23 11:42:54 +02:00
Dirkjan Ochtman 9f437c0da7 proto: move IterErr below users 2023-10-23 11:42:54 +02:00
Dirkjan Ochtman 99ef446331 Yield protocol violation for packets without frames 2023-10-23 11:42:54 +02:00
Benjamin Saunders e1e1e6e392 Remove explicit rust-version requirement from unpublished crates 2023-09-24 14:22:14 -07:00
Benjamin Saunders 81d83a93be Reduce rightward drift 2023-09-24 14:22:14 -07:00
Benjamin Saunders e51f848296 Bump MSRV to 1.65 for let-else 2023-09-24 14:22:14 -07:00
Benjamin Saunders fc5e689b88 Fix ACK frequency extension corner case
Reflects the logic change in
https://github.com/quicwg/ack-frequency/pull/222. See also discussion
in https://github.com/quicwg/ack-frequency/issues/183.
2023-09-24 14:22:14 -07:00
Romain Vimont e5bf98c3d7 Pass byte read count to FinishEarly
If read_exact() finishes early (end of stream), report the number of
bytes actually read.

Fixes #1663
2023-09-20 12:18:42 -07:00
Dirkjan Ochtman f81c2fafa7 More principled error handling for invalid frames 2023-09-20 12:16:58 -07:00
Benjamin Saunders 0af891e0b8 Don't send IMMEDIATE_ACK frames every RTT
This behavior was redundant to intelligent transmission of
ACK_FREQUENCY frames when RTT change is observed.
2023-09-09 10:21:24 -07:00
Benjamin Saunders b83d5c483c Test automatic adjustment of max ACK delay 2023-09-09 10:21:24 -07:00
Benjamin Saunders 1f70570c65 Don't clamp max ACK delay to RTTs below 25ms 2023-09-09 10:21:24 -07:00
Benjamin Saunders 2d26d9363a Adjust max ACK delay dynamically based on RTT 2023-09-09 10:21:24 -07:00
Benjamin Saunders 86ea03ec86 Push max ACK delay clamping down into ACK frequency logic 2023-09-09 10:21:24 -07:00
Benjamin Saunders d30d5479a3 Intelligible time logging in tests
Replaces "advancing to Instant { ... }" with e.g. "advancing to 10ms"
2023-09-09 10:21:24 -07:00
Benjamin Saunders 8b7cea22ca Trace-log transmitted max_ack_delay values 2023-09-09 10:21:24 -07:00
dependabot[bot] 5d4d58387d Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 16:24:17 +02:00
Benjamin Saunders d51b630fcd Add client/server spans to bulk benchmark 2023-09-02 22:30:11 -07:00
Benjamin Saunders 7442da16f9 Enable ACK frequency extension in bulk benchmark 2023-09-02 22:30:11 -07:00
Benjamin Saunders 089e213fba Generalize UdpStats::transmits to ios
Since this field exists for both tx and rx, we might as well make use
of it.
2023-09-02 21:22:12 +02:00
Damien Deville a516c2b836 Silence an info message related to ack frequency 2023-08-31 17:33:09 +00:00
Damien Deville a7a3c4da6a Add missing export for proto::AckFrequencyConfig. 2023-08-29 16:25:32 +02:00
Dirkjan Ochtman 307d80b939 proto: make now explicit for Endpoint::connect() 2023-08-25 11:55:43 -07:00
Dirkjan Ochtman c2a54b9acf Set workspace resolver explicitly 2023-08-25 11:55:43 -07:00
Dirkjan Ochtman 2d9bdaecc8 Silence clippy false positive 2023-08-25 11:55:43 -07:00
Dirkjan Ochtman e0f81593f7 Fix formatting for Rust 1.72 2023-08-25 11:55:43 -07:00
Benjamin Saunders 7f26029284 proto: detect stateless resets in authed and unprotected packets
RFC9000 says: endpoints MUST treat any packet ending in a valid
stateless reset token as a Stateless Reset

Previously, we did not detect stateless resets that appeared to be
unprotected packets (e.g. Retry or Version Negotiation) or which were
successfully decrypted (astronomically unlikely with TLS, but possible
with custom cryptographic layers).
2023-08-23 14:19:02 -07:00
Benjamin Saunders 394ac8c2b8 proto: don't panic when draining a unknown connection
A panic here was reported by a user when testing under very scarce CPU
conditions. The root cause is not yet well understood (perhaps a
connection emitting `Drained` twice for some reason?), but we can
still reduce the blast radius.
2023-08-23 13:32:12 -07:00
Dirkjan Ochtman 47678a1a62 Replace Gitter link with Discord 2023-08-22 13:29:59 -07:00
Benjamin Saunders 8c58cc7781 proto: add forgotten fields to Debug for TransportConfig 2023-08-21 19:23:23 -07:00
Benjamin Saunders 33fa6bb24d proto: Fix double-boxing of congestion::ControllerFactory
Also allows callers who already have a trait object to pass it on
without yet more boxing.
2023-08-21 19:13:23 -07:00
Benjamin Saunders 6d4830eaef Fix client/server tracing span placement in echo_* tests
These must enclose the endpoint construction and connect calls.
2023-08-21 19:10:38 -07:00
Benjamin Saunders 13db6076a3 Propagate current tracing span to spawned connection drivers
For clients, this is the span that was current when the connection
attempt was initiated; for servers, it is the span of the endpoint
task, which is the span that was current when the endpoint was
constructed.
2023-08-21 19:10:38 -07:00
Benjamin Saunders f07a40d7f1 proto: use deterministic packet numbers in tests that count ACKs
Prevents spurious failures when a skipped packet number causes an
extra ACK to be sent by reordering detection logic.
2023-08-20 22:48:47 -07:00
Benjamin Saunders bef724969c proto: Allow test code to opt out of skipping packet numbers 2023-08-20 22:48:47 -07:00
Benjamin Saunders b3652a8336 udp: disable GSO on EINVAL
Linux 5.15 was observed to emit an EINVAL when attempting to transmit
UDP with GSO over IPv6 on a virtio net interface. 6.1 was also
observed to emit EINVAL, though only after EIO. In both cases, EINVAL
was suppressed by disabling GSO.
2023-08-20 15:54:28 -07:00
Benjamin Saunders a06838abde proto: Allow GSO to be manually disabled 2023-08-20 13:30:30 -07:00
Benjamin Saunders 5cca3063f6 udp: don't log EMSGSIZE errors
These are occasionally expected now that we're generating MTU probes,
and have been observed to cause unnecessary concern from users.
2023-08-17 19:11:13 -07:00
Floris Bruynooghe 9cdae99a50 Add docs for RecvMeta (#1634)
This helps implementors of AsyncUdpSocket.
2023-08-17 21:04:20 +02:00
Dirkjan Ochtman c02c8a5a7a udp: use set_socket_option_supported() wrapper
Make sure we still propagate other errors to the caller.
2023-08-16 19:25:12 -07:00
JieLiang Ma b4cc111b88 set may_fragment based on whether setting IP_DONTFRAG fails with ENOPROTOOPT. 2023-08-15 13:40:54 +02:00