Benjamin Saunders
8812ab887e
Queue endpoint events with an intrusive list
2023-08-26 16:09:04 -07:00
Benjamin Saunders
45deb07bf7
Communicate endpoint events at proto layer via shared memory
...
Simplifies the -proto API and reasoning about memory use
2023-08-26 16:08:30 -07:00
Benjamin Saunders
34dfec147e
Don't plumb current time through endpoint events
...
This was only needed to determine the base time for the next
CID retirement timer, for which the marginal delay caused by fetching
a new `Instant::now()` on demand is harmless.
2023-08-20 14:05:16 -07:00
Benjamin Saunders
71432b7436
Move side effects out of add_connection
...
Unblocks interior mutability of the index and connections fields.
2023-08-20 13:50:11 -07:00
Benjamin Saunders
1b9a769646
Use the thread-local RNG in Endpoint
2023-08-20 13:50:11 -07:00
Benjamin Saunders
3e3f315b0f
Require CID generators to be internally thread-safe
2023-08-20 13:50:11 -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
JieLiang Ma
7b72b71c2f
Move function may_fragment() from lib quinn-udp to UdpSocketState.
2023-08-15 13:40:54 +02:00
Dirkjan Ochtman
4f25f501ef
udp: simplify socket state initialization
2023-08-11 11:49:09 -07:00
Ben Saunders
20612b632b
Privatize TransportParameters::default()
2023-08-09 14:30:11 -07:00
dependabot[bot]
8076ffe94d
Bump Swatinem/rust-cache from 1 to 2
...
Bumps [Swatinem/rust-cache](https://github.com/swatinem/rust-cache ) from 1 to 2.
- [Release notes](https://github.com/swatinem/rust-cache/releases )
- [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md )
- [Commits](https://github.com/swatinem/rust-cache/compare/v1...v2 )
---
updated-dependencies:
- dependency-name: Swatinem/rust-cache
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-08-07 11:44:09 -07:00
Benjamin Saunders
70e14b5c26
Mitigate optimistic ACK attacks
2023-07-29 15:24:18 -07:00
Floris Bruynooghe
532ba7d804
Preserve the tracing span in the EndpointDriver task
...
The EndpointDriver is spawned in a task. Unless the span is copied
into this task the current span is lost.
Copying the current span means any tracing calls inside the driver,
from e.g. a custom AsyncUdpSocket, are preserved in the span. This
makes it easy to use different parent spans for different endpoints
and have log messages appear with their parent span. Otherwise these
log messages are not attached to a span.
2023-07-27 16:12:49 -07:00
Benjamin Saunders
89ff085cf5
Reduce default maximum UDP payload size to the ethernet MTU
...
Drastically reduces the size and sparsity of the quinn receive buffer
for no performance cost in typical applications.
2023-07-25 23:36:08 -07:00
Benjamin Saunders
4973c4ab29
Bump quinn-udp version
2023-07-24 16:35:51 -07:00
Benjamin Saunders
f15d837578
Fold UdpState into UdpSocketState
...
Simplifies the quinn-udp API, and helps isolate internal complexity to
the platforms that need it.
2023-07-24 16:35:51 -07:00
Benjamin Saunders
3eb23bc730
Fold UdpState into AsyncUdpSocket
...
Allows knowledge of UdpState to be isolated entirely within
AsyncUdpSocket implementations, simplifying quinn::Endpoint and the
poll_send API, and exposing more control over UDP feature checks to
implementers.
2023-07-24 16:35:51 -07:00
Benjamin Saunders
78720d0d4f
Perform a key update early in a connection's lifetime
2023-07-24 11:27:11 -07:00
Benjamin Saunders
e92153667d
Update docs for UDP fragmentation configuration support
...
As of 092a7686a4 , MTUD is enabled by
default on all major platforms, and automatically disabled regardless
of configuration otherwise.
2023-07-24 14:12:38 +02:00
Adolfo Ochagavía
0f47d35193
Ensure ack delay is correctly set
...
Sponsored by Stormshield
2023-07-24 14:08:09 +02:00
Adolfo Ochagavía
17014315c5
Extract decrypt_packet_body function
...
Sponsored by Stormshield
2023-07-24 14:08:09 +02:00
Adolfo Ochagavía
ad71ca3dd8
Extract unprotect_header function
...
Sponsored by Stormshield
2023-07-24 14:08:09 +02:00
Adolfo Ochagavía
bab7b0af91
Implement acknowledgement frequency
...
Sponsored by Stormshield
perf-regression
2023-07-24 14:08:09 +02:00
Jonatan Hatakeyama Zeidler
0ae7c60b15
Reexport rustls crate
2023-07-17 12:00:39 -07:00
Benjamin Saunders
b7695b1ddd
Replace .rev().next() with .next_back()
2023-07-15 13:42:18 -07:00
Lijun Wang
e652b6d999
Suppress stateless packets when endpoint transmit queue is large
2023-07-06 14:10:04 -07:00
tim gretler
6d3958fce5
make new_with_abstract public again
2023-06-30 09:58:14 +02:00
tim gretler
a8c17a3e17
merge converged endpoint constructors
2023-06-30 00:11:15 -07:00
tim gretler
35089ee1c8
use boxed udp socket
2023-06-30 00:11:15 -07:00
Ian Kettlewell
b30711f559
Update README.md to say "see examples for usage" with link.
2023-06-27 21:19:35 +02:00
dependabot[bot]
790ff720a9
Update rcgen requirement from 0.10.0 to 0.11.1
...
Updates the requirements on [rcgen](https://github.com/est31/rcgen ) to permit the latest version.
- [Changelog](https://github.com/est31/rcgen/blob/master/CHANGELOG.md )
- [Commits](https://github.com/est31/rcgen/compare/v0.10.0...v0.11.1 )
---
updated-dependencies:
- dependency-name: rcgen
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-06-19 16:20:46 +02:00
Benjamin Saunders
7914468e27
Merge redundant impl Connecting blocks
2023-06-12 14:12:15 -07:00
Benjamin Saunders
926f927135
Fix panic on redundant finish calls
2023-06-12 14:12:15 -07:00
Jonathan Johnson
98f5fe2a3f
Added Endpoint::reject_new_connections ( #1585 )
...
This commit adds a new function that refuses new connections without
impacting existing connections. Internally, this just sets the
connection limit to 0, which causes incoming connections to be rejected.
This is the same approach that was taken in 0.8.5 when `Incoming` was
dropped.
2023-06-07 10:15:52 +02:00
Benjamin Saunders
65bbb1e154
Update obsolete doc comment
2023-06-04 07:44:53 +02:00
Benjamin Saunders
c1d412c7aa
Bump versions to reflect API breakage
2023-06-03 14:58:29 -07:00
Benjamin Saunders
b73ed0b73a
Rename issue_cids to issue_first_cids to better reflect its role
2023-06-03 14:58:29 -07:00
Benjamin Saunders
6d2d9fda4c
Allocate persistent connection IDs immediately when generated
...
Guards against future bugs where multiple (e.g. concurrent) calls to
`new_cid` might otherwise lead to an undetected collision.
2023-06-03 14:58:29 -07:00
Benjamin Saunders
951761f7e6
Yield endpoint-generated responses directly rather than buffering
2023-06-03 14:58:29 -07:00
Benjamin Saunders
8b67ae483c
Move ConnectionHandle into DatagramEvent
...
Simplifies signatures and prepares for non-connection-related datagram
events.
2023-06-03 14:58:29 -07:00
Benjamin Saunders
97ccc4f611
Factor connection lookup out into a dedicated struct
2023-06-03 14:58:29 -07:00
Benjamin Saunders
85d9a5c6c9
Remove redundant/obsolete Endpoint::reject_new_connections
...
This was previously used by the `quinn` layer to stop accepting
connections when the `Incoming` stream was dropped. That stream has
since been replaced by an async function. Users who still want this
can use set_server_config directly.
2023-06-03 14:58:29 -07:00
Benjamin Saunders
1373443ad0
Fix invalid CIDs being ignored when using zero-length CIDs
2023-06-03 14:58:29 -07:00
Benjamin Saunders
23ad201255
Fix obsolete debug struct name
2023-06-03 14:58:29 -07:00
Benjamin Saunders
fb91cf4706
Reduce ConnectionId copying
2023-06-03 14:58:29 -07:00
Dirk Stolle
a604759336
Replace unmaintained actions-rs/* actions in CI workflows
...
Basically all of the `actions-rs/*` actions are unmaintained. See
<https://github.com/actions-rs/toolchain/issues/216 > for more
information. Due to their age they generate several warnings in
CI runs.
To get rid of those warnings the occurrences of
`actions-rs/toolchain` are replaced by `dtolnay/rust-toolchain`,
and the occurrences of `actions-rs/cargo` are replaced by direct
invocations of `cargo`.
2023-06-02 14:35:20 -07:00
Dirk Stolle
c3aef84315
Extend Dependabot configuration to keep GitHub Actions up to date
2023-06-02 22:59:53 +02:00