Commit Graph

3174 Commits

Author SHA1 Message Date
Benjamin Saunders d00a71c695 Improve error when connecting with an unsupported version
If the cryptographic layer supports a version not in the local
endpoint's supported versions list, a connection could have been
initiated with that version for which all packets returned by a
compatible peer would hav ebeendropped. This is a relatively easy
configuration error to make.
2023-01-24 22:06:21 -08:00
dependabot[bot] e5a5d3eeb8 Update windows-sys requirement from 0.42.0 to 0.45.0
Updates the requirements on [windows-sys](https://github.com/microsoft/windows-rs) to permit the latest version.
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Commits](https://github.com/microsoft/windows-rs/compare/0.42.0...0.45.0)

---
updated-dependencies:
- dependency-name: windows-sys
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-23 15:14:36 +01:00
Benjamin Saunders af4c4caeb2 Fix racy Endpoint::wait_idle 2023-01-08 06:37:22 +01:00
XOR-op c88a6ecd7b reexport whole quinn-udp module 2023-01-07 21:59:19 +01:00
XOR-op 50a474d7ab reexport udp::{RecvMeta, UdpState} for AsyncUdpSocket 2023-01-07 21:59:19 +01:00
Benjamin Saunders 49cdfa553e Route logs via log crate by default when tracing isn't used 2022-12-24 21:37:50 +01:00
Benjamin Saunders 05dabf17f8 Fail gracefully on attempts to connect to an unspecified IP address 2022-12-24 21:19:59 +01:00
Dirkjan Ochtman 2c6aa43610 Apply clippy suggestions from Rust 1.66 2022-12-19 10:13:01 -08:00
Dan Shields 088f244e2a Update deny.toml
https://github.com/qnighy/yasna.rs/issues/63 is resolved
2022-12-18 22:13:01 -08:00
Zicklag dea7f84a22 Update Wording About Quick Being a Draft 2022-12-13 10:24:13 +01:00
StygianLightning 389d7ce506 Remove unnecessary casts. 2022-12-10 11:07:03 -08:00
StygianLightning 943b78cbd1 Use Box::default() 2022-12-10 11:07:03 -08:00
StygianLightning 019affdf9f Use clamp instead of a local re-implementation. 2022-12-10 11:07:03 -08:00
StygianLightning 0d366990f1 Removed an obsolete lint control annotation.
The lint issue that made the workaround necessary has been resolved.
2022-12-10 11:07:03 -08:00
StygianLightning b170993bd1 Fixed a typo. 2022-12-10 11:07:03 -08:00
Benjamin Saunders 7d1b280f55 Bump versions 0.9.3 2022-12-05 22:37:28 +01:00
Benjamin Saunders c794cc9138 Respect max_udp_payload_size transport parameter
This has no effect with our default minimal MTU, but if the MTU is
configured higher manually it's required for conformance.
2022-12-05 02:57:54 -08:00
Dirkjan Ochtman fd845b0c64 udp: add safe wrapper for setsockopt() 2022-12-02 10:49:06 -08:00
lucifer9 166e0fb60a Fix build on FreeBSD, add CI test for FreeBSD, set IPV6_RECVPKTINFO on FreeBSD & macOS, set IP_RECVDSTADDR on FreeBSD and macOS only for IPv4, fix a warning about unused state: &UdpState, allow different types for the 3rd argument to sendmmsg()/recvmmsg() 2022-12-02 02:33:38 -08:00
Brandon Williams 9f50319421 send-stream: rely on cleaning up waker for Stopped in SendStream Drop impl 2022-11-29 15:26:15 -08:00
Brandon Williams 70ef5039e9 recv-stream: clean up any previously register wakers when RecvStream is dropped 2022-11-29 15:26:15 -08:00
Brandon Williams f6ae67e2fa send-stream: clean up any previously register wakers when SendStream is dropped 2022-11-29 15:26:15 -08:00
Brandon Williams 7ba0acb8da send-stream: unregister waker when Stopped is dropped 2022-11-29 11:35:34 -08:00
Brandon Williams 1122c627c3 connection: wake 'stopped' streams on stream finish events
In the event that the SendStream Stopped future is polled once and then dropped
before the remote side has stopped the stream, and instead the stream
has been finished, the waker registered in the connection stopped map is
never removed and is effectively "leaked" until the connection is
closed. This can lead to a large amount of memory being retained when a
connection is very long lived and many streams are used over the life of
that connection.
2022-11-29 11:35:34 -08:00
Benjamin Saunders cfb7a067ee Bump version 0.9.2 2022-11-28 20:27:12 -08:00
Benjamin Saunders 478445ea71 Fix panic on concurrent read_datagram completion
The previous logic assumed that a datagram must be available if the
future was notified, but this might not be the case if e.g. two
futures are concurrently waiting for datagrams, but only one datagram
has been received, since we use notify_waiters to wake all waiting
futures to be robust in the face of cancellation.
2022-11-28 20:27:12 -08:00
Benjamin Saunders 5c7f7aabfa Allow initial MTU to be specified in bulk benchmark 2022-11-27 21:23:24 -08:00
Damien Deville 78401c614f Fix GSO / GRO auto detection when IPv6 is disabled. 2022-11-23 10:23:06 -08:00
Benjamin Saunders fb2af0816e Update description to reflect abstract runtime support 2022-11-22 19:34:52 -08:00
Benjamin Saunders 73707103f4 Bump quinn-udp version 2022-11-22 18:00:22 -08:00
Jeremy Knope b8b9bffe3c fix: don't bail if setting IP_RECVTOS fails
old macOS versions don't support it

(cherry picked from commit 64b660a8c2)
2022-11-22 18:00:22 -08:00
Benjamin Saunders e03f0f13c8 Pad packets enough to permit stealthy stateless resets 2022-11-21 00:08:55 +01:00
Benjamin Saunders fbccb656cc Detect stateless resets with malformed headers
A valid stateless reset packet might not be large enough to contain
the expected connection ID, which can cause header decoding to fail.
2022-11-21 00:08:55 +01:00
Benjamin Saunders 1d390af2fa Bump versions for 0.9.1 release 0.9.1 2022-11-15 06:50:40 +01:00
Benjamin Saunders 2dca78766a Less confusing Notify name for local stream opening
Remotely-initiated streams can be said to be opened as well.
2022-11-14 01:18:03 -08:00
Benjamin Saunders d73fcfd4a0 Fix stream open futures sometimes waiting on the wrong notification
After a spurious wakeup, `Connection::open_uni` and `open_bi` would
switch to waiting for notifications about incoming streams, rather
than the intended notification about new stream ID flow control
budget. This was probably a copy-paste error from `poll_accept`.
2022-11-14 01:18:03 -08:00
Benjamin Saunders f016928460 Fold MAX_STREAMS fields on Retransmits into an array for concision
No behavioral change.
2022-11-14 01:17:22 -08:00
Benjamin Saunders a3b35f93c2 Fix duplicate MAX_STREAMS transmit
When the application observes a stream finish or reset, we dispose of
its state via `StreamsState::stream_freed`, and queue a transmit of
stream flow control credit directly on the
`Connection`. `stream_freed` however also sets
`StreamsState::max_streams_dirty`, which is polled each time we
receive a packet to see whether a stream has become fully closed due
to an incoming frame. Together, these led to a MAX_STREAMS frame being
transmit both immediately, and following the next packet receipt. We
prevent that by unsetting the appropriate `max_streams_dirty` flags
when sending `MAX_STREAMS`.
2022-11-14 01:17:22 -08:00
Benjamin Saunders 641114a69d Fix clippy lints 2022-11-14 01:17:22 -08:00
Damien Deville b80baa008d Add --initial-max-udp-payload-size command line option for perf
client and server binaries to change the initial size of UDP
packet payload.
0.9.0
2022-10-28 09:24:03 +02:00
Damien Deville cebfb270f6 Add --keylog command line option for perf client and server
binaries. This allow dumping crypto keys to disk using
SSLKEYLOGFILE env var.
2022-10-27 17:49:28 -07:00
Dirkjan Ochtman 28a2c8052c quinn: bump dependency on tokio to 1.13
We now use `UdpSocket::poll_send_ready()` and `UdpSocket::poll_recv_ready()`.
2022-10-26 16:10:29 -07:00
Dirkjan Ochtman 57bd7643e7 quinn-udp: bump version to 0.3 2022-10-26 16:10:29 -07:00
Benjamin Saunders 4c4da517fe Bump version numbers for 0.9 release 2022-10-26 12:50:12 +02:00
Benjamin Saunders 00fb34759d Move idle Notify handle into endpoint Shared 2022-10-23 08:18:42 +02:00
Benjamin Saunders 7d51d2e57e Remove Incoming stream in favor of Endpoint::accept 2022-10-23 08:18:42 +02:00
Benjamin Saunders b8857397ff Introduce Endpoint::accept method for better ergonomics 2022-10-23 08:18:42 +02:00
Benjamin Saunders c63059547c Update book for removal of NewConnection 2022-10-23 07:35:41 +02:00
Benjamin Saunders feca8abebf Accessor for free datagram send buffer space
Useful for applications which can adapt to variable bandwidth on the
fly, such as video streaming.
2022-10-20 09:26:20 +02:00
Benjamin Saunders 4c5d7d0894 Expose a getter for the close reason 2022-10-20 09:25:27 +02:00