Commit Graph

3779 Commits

Author SHA1 Message Date
Floris Bruynooghe 19da2ea46e Do not test all features
This test takes forever and we run out of disk space doing it.  This
is a problem for upstream to handle, we're fine if things work for us.
2025-01-15 11:56:21 +01:00
Diva M e327770cc6 fix docs 2025-01-14 23:33:35 -05:00
Diva M ad76ba092a when fixes are bugs 2025-01-14 23:27:54 -05:00
Diva M 03108fe877 more fixes to workflows 2025-01-14 23:25:52 -05:00
Diva M 8cbeec3979 use iroh-* crate in new ci workflow 2025-01-14 23:20:52 -05:00
Diva M e708f3a631 fix missed in merge 2025-01-14 23:18:46 -05:00
Diva M 7640a8949e rm CODEOWNERS 2025-01-14 23:15:36 -05:00
Diva M a935ad4df0 Merge commit '6ee883a2' into iroh-0.11.x 2025-01-14 23:05:01 -05:00
Floris Bruynooghe 76e002c99b Describe how to find the upstream version 2025-01-09 14:25:45 +01:00
Asmir Avdicevic fd9f5c1024 chore: add project tracking (#24) 2025-01-03 14:10:42 +01:00
Max Inden 6ee883a20c fix(udp): make GRO (i.e. URO) optional, off by default
We have multiple bug reports for URO on Windows, including non-ARM. See:

- https://github.com/quinn-rs/quinn/issues/2041
- https://bugzilla.mozilla.org/show_bug.cgi?id=1916558

Instead of enabling GRO on Windows by default, this commit changes the default
to off, adding a `set_gro` to optionally enable it.
quinn-udp-0.5.9
2024-12-17 19:31:02 +00:00
Max Inden 85011ef42e Revert "fix(udp): do not enable URO on Windows on ARM"
This reverts commit 7260987c91.
2024-12-17 19:31:02 +00:00
Max Inden b720c6a1d3 chore(udp): increase crate patch version to v0.5.9 2024-12-17 12:55:37 +00:00
Max Inden e953059994 fix(udp): retry send on first EINVAL
Android API level < 26 does not support the `libc::IP_TOS` control message.
`sendmsg` calls with `libc::IP_TOS` return `libc::EINVAL`.

https://github.com/quinn-rs/quinn/pull/1516 added a fallback, not setting
`libc::IP_TOS` on consecutive calls to `sendmsg` after a failure with
`libc::EINVAL`. The current datagram would be dropped. Consecutive datagrams
passed to `sendmsg` would succeed as they would be sent without `libc::IP_TOS`
through the fallback.

Instead of dropping the first datagram on `libc::EINVAL`, this commit adds a
retry for it without `libc::IP_TOS`.

This is e.g. relevant for Neqo. When establishing a QUIC connection, dropping
the first datagram [delays connection establishment by
100ms](https://github.com/mozilla/neqo/blob/3001a3a56f2274eaafaa956fb394f0817f526ae7/neqo-transport/src/rtt.rs#L28).
With the retry introduced in this commit, delay due to unsupported
`libc::IP_TOS` should be negligeable.

Closes https://github.com/quinn-rs/quinn/pull/1975.
2024-12-17 12:55:37 +00:00
Max Inden a83c6e463b ci: run on Android API Level 25 2024-12-17 12:55:37 +00:00
Max Inden cb0b59d09c refactor(udp): remove unnecessary return
No need to `return Ok(())` early, given the final `return Ok(())` at the end of
the function. Makes it consistent with other `send` implementations. Makes it
consistent with early returns being errors only.
2024-12-17 12:25:31 +00:00
Phoenix Kahlo 51606c6e34 Make SystemTime mockable via object
- Adds trait TimeSource
- Adds default implementation StdSystemTime
- Adds ServerConfigParameter time_source: Arc<dyn TimeSource>
- Replaces all SystemTime::now calls in proto with TimeSource.now calls
  (there were 2)

This is a backwards-compatible change.
2024-12-17 08:22:09 +00:00
Phoenix Kahlo c5f81bec9b proto: Make Connection externally use SideArgs
Server/client-specific args to proto::Connection::new are now passed
through a new SideArgs enum.
2024-12-16 18:56:53 +00:00
Phoenix Kahlo e706cd8ac0 proto: Make Connection internally use SideState
Moves server/client-specific fields of proto::Connection to a new
SideState enum.
2024-12-16 18:56:53 +00:00
Phoenix Kahlo 51e974e4d9 proto: Refactor TokenDecodeError 2024-12-16 09:30:38 +00:00
Phoenix Kahlo caf838947c tests(proto): Gate PLPMTUD test
There is a should_panic test which depends on a debug assertion to
panic. This commit makes the test enabled only when debug assertions
are enabled. This fixes `cargo test --release`.
2024-12-16 09:28:59 +00:00
Phoenix Kahlo 73545b65b3 Adjust terminology regarding tokens
RFC 9000 presents some unfortunate complications to naming things. It
introduces a concept of a "token" that may cause a connection to be
validated early. In some ways, these tokens must be treated discretely
differently based on whether they originated from a NEW_TOKEN frame or
a Retry packet. It also introduces an unrelated concept of a "stateless
reset token".

If our code and documentation were to constantly use phrases like "token
originating from NEW_TOKEN frame," that would be extremely cumbersome.
Moreover, it would risk feeling like leaking spec internals to the user.

As such, this commit tries to move things towards the following naming
convention:

- A token from a NEW_TOKEN frame is called a "validation token", or
  "address validation token", although the shorter form should be used
  most often.
- A token from a Retry packet is called a "retry token".

  We should avoid saying "stateless retry token" because this phrase is
  not used at all in RFC 9000 and is confusingly similar to "stateless
  reset token". This commit changes public usages of that phrase.
- In the generic case of either, we call it a "token".
- We still call a stateless reset token a "reset token" or "stateless
  reset token".
2024-12-15 06:23:50 +00:00
Phoenix Kahlo 04b9611aff docs(quinn): Tweak Connecting docs 2024-12-15 06:05:34 +00:00
Phoenix Kahlo 8ab077dbce quinn: Remove obsolete must_use for futures 2024-12-15 06:05:09 +00:00
Phoenix Kahlo db4c0e40da chore: Re-ignore stress tests in solaris 2024-12-15 06:04:21 +00:00
Phoenix Kahlo 05f6e67de6 Minor style changes
- Adds .zed to gitignore
- Doc comments tweaks
  - Consistent punctuation and width
  - Documenting defaults
  - Other tweaks
- Debug implementation tweaks
  - Elide fields via finish_non_exhaustive
  - Other tweaks
2024-12-14 20:02:50 +00:00
Phoenix Kahlo 6716b5a7b8 tests(quinn): Ignore stress tests by default 2024-12-13 20:35:53 +00:00
dignifiedquire 7647bd01dd feat(quinn-proto): unhide quinn_proto::coding
It turned out currently the `coding` mod is already public, simply hidden from the docs.

It seems to be the minimal change to allow using this functionality for `VarInt` is to document it and not hide it.

Fixes #1277
2024-12-12 20:36:04 +00:00
Max Inden 204b14792b chore(udp): increase crate patch version to v0.5.8 quinn-udp-0.5.8 2024-12-06 18:24:20 +00:00
Max Inden 7260987c91 fix(udp): do not enable URO on Windows on ARM
On Windows on ARM with Windows Subsystem for Linux (WSL) `WSA_RECVMSG` does not
return the segment size of coalesced UDP datagrams. See
https://github.com/quinn-rs/quinn/issues/2041 for details.

While lacking a fix for the root cause, don't enable URO, i.e. don't coalesce
UDP datagrams on Windows on ARM.
2024-12-06 18:24:20 +00:00
BigWingBeat 728a335454 Remove redundant nonblocking config on async-std 2024-12-06 18:13:33 +00:00
Max Inden 31a0440009 fix(udp): retry on ErrorKind::Interrupted
On Linux and Android, `quinn-udp` will retry a send on `ErrorKind::Interrupted`:

https://github.com/quinn-rs/quinn/blob/e318cc4a80436fd9fa19c02886d682c49efca185/quinn-udp/src/unix.rs#L305-L312

Do the same on all other unix platforms.
2024-12-03 23:29:39 +00:00
Max Inden 53e13f2eb9 fix(udp): propagate error on apple_fast
With https://github.com/quinn-rs/quinn/pull/2017, the concrete `send`
implementations per platform are supposed to propagate `io::Error`s. Those
errors are then eiter logged and dropped in `UdpSocketState::send` or further
propagated in `UdpSocketState::try_send`.

The `fast_apple` `send` implementation added in
https://github.com/quinn-rs/quinn/pull/1993 does not follow this pattern.

This commit adjusts the `fast_apple` implementation accordingly.
2024-11-29 21:17:29 +00:00
Max Inden 7551282bdc fix(udp): use IPV6_PMTUDISC_PROBE instead of IP_PMTUDISC_PROBE on v6
Both resolve to `3`, thus not an actual bug.
2024-11-29 19:05:14 +00:00
Asakura Mizu e318cc4a80 feat(quinn-udp): support illumos 2024-11-29 09:06:37 +00:00
Yury Yarashevich f18890960d #2057: Write transport parameters in random order. 2024-11-28 10:02:24 +00:00
Yury Yarashevich af4f29b845 #2057: Extract known transport parameter IDs into enum. 2024-11-28 10:02:24 +00:00
Dirkjan Ochtman 1c463ab5b4 proto: split config module 2024-11-27 22:03:42 +00:00
Dirkjan Ochtman e20d4caca4 Add CODEOWNERS 2024-11-27 22:00:25 +00:00
Dirkjan Ochtman 81f4d6b036 Bump MSRV to 1.71 2024-11-27 21:08:22 +00:00
Yury Yarashevich 2edf192511 #2057: Use randomly generated GREASE transport parameter. 2024-11-21 21:43:09 +00:00
Phoenix Kahlo a4c886c38a docs: Correct MSRV in README 2024-11-21 03:50:57 +00:00
Benjamin Saunders df7f58e19b Fail accept immediately on stale Incoming 2024-11-20 19:31:32 +00:00
Benjamin Saunders ff4663b696 Preserve the time a new incoming packet was received at 2024-11-20 19:31:32 +00:00
Dirkjan Ochtman b44294e411 Allow Unicode 3.0 license 2024-11-20 18:35:28 +00:00
Thomas Eizinger 9386cde871 Only set segment_size if it is different from the transmit length 2024-11-19 05:50:16 +00:00
Thomas Eizinger c613edf3a3 Log failure to set UDP_SEGMENT option 2024-11-19 05:50:16 +00:00
Thomas Eizinger 95a63d7cd2 Don't log and return
Logging AND returning errors is considered an anti-pattern because it
leads to duplicate logs.
2024-11-19 05:44:36 +00:00
Thomas Eizinger a16dcd27de Log GSO halt on info
It is common to set up automated error reporting based on `ERROR` and
potentially also `WARN` logs. Whilst GSO being unsupported is certainly
something worthwhile logging, the `ERROR` log level seems a bit
excessive and leads to unactionable errors reports.

The system can still operate with `max_gso_segments == 1`. As such, this
codepath "merely" indicates a state change in the system but not a fatal
error. As such, logging this on INFO level seems more appropriate.
2024-11-19 05:44:36 +00:00
Lars Eggert f8b8c5032e chore: Fix cargo clippy issues 2024-11-18 23:31:18 +00:00