Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 24 additions & 21 deletions quest/m1/vendor-sync/quinn.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,30 @@ the open BBR3 PR moq-congestion carries from
for fixes to port, and records the PR commit checked in the README's BBR3
entry. It was force-pushed to `01b8848d` on 2026-10-20.

Last checked: the fork point
[`7616e6b2`](https://github.com/quinn-rs/quinn/commit/7616e6b2782722f3ce4a1b181ef08817d7f545e4)
(2026-10-05), plus the commits the README lists as ported. Upstream `main` was
at [`a2c55b36`](https://github.com/quinn-rs/quinn/commit/a2c55b36817ccaac1c39c6db92de8294f281819f)
(2026-10-30), 18 commits later. Record the newest upstream commit checked in
`rs/moq-quic/README.md`'s `Upstream` section.

First run: four fixes on quinn `main` are not in the ledger yet. Check each
against the fork's code before porting, since a missing ledger entry does not
prove the bug remains:
[`f233510c`](https://github.com/quinn-rs/quinn/commit/f233510c) (honor a
disabled idle timeout when accepting),
[`6c69f9f4`](https://github.com/quinn-rs/quinn/commit/6c69f9f4) (don't
credit a reset stream's unread data twice on stop; the fork rewrote `stop`
under the README's "Stream credit on stop", so it may already hold),
[`623a0369`](https://github.com/quinn-rs/quinn/commit/623a0369) (don't make
specific IPv6 endpoints dual-stack), and
[`a2c55b36`](https://github.com/quinn-rs/quinn/commit/a2c55b36) (IPv4 source
address on Apple, in `moq_sock::udp`). Also judge the new `read_datagrams`
API ([`2697de1e`](https://github.com/quinn-rs/quinn/commit/2697de1e)), a
feature: plan it with `/quest-plan` if moq-tokio's driver would use it.
Last checked: quinn `main` through
[`2697de1e`](https://github.com/quinn-rs/quinn/commit/2697de1e1314cb9f98502b7323acd5bdd836b582)
(2026-10-28) and `0.11.x` through
[`4b84837d`](https://github.com/quinn-rs/quinn/commit/4b84837df1d25424bc37b0ed990e7b376d40a9c0),
recorded in `rs/moq-quic/README.md`'s `Upstream` section
([moq-dev/moq#7287](https://github.com/moq-dev/moq/pull/7287) checked
`f233510c`, `6c69f9f4`, and `623a0369`). Record the newest upstream commit
checked there.

Remaining this run:
[`a2c55b36`](https://github.com/quinn-rs/quinn/commit/a2c55b36817ccaac1c39c6db92de8294f281819f)
(honor IPv4 source addresses on Apple: send `IP_PKTINFO` rather than
`IP_RECVDSTADDR`, in `moq_sock::udp`), the quinn#2481 check above, and judging
the new `read_datagrams` API
([`2697de1e`](https://github.com/quinn-rs/quinn/commit/2697de1e)), a feature:
plan it with `/quest-plan` if moq-tokio's driver would use it.

Learned so far: a fix missing from the ledger is often already held, since the
fork reworked the same code (`stop` under `RESET_STREAM_AT`, the stale-accept
check under `handshake_timeout`, and socket setup in `moq_sock::bind`), so
check the fork's code before porting. A fix to quinn's `Endpoint::client` or
`server` lands in `moq_sock::bind`, which the driver's test helpers bind
through. Most of `0.11.x` is backports of `main`; compare its commits by
subject.

Public API: none expected; a ported fix that changes one says so. Wire:
QUIC behavior follows upstream's fixes.
Expand Down
5 changes: 5 additions & 0 deletions rs/moq-quic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ Ported since the fork point:
- [`f74e6a8a`](https://github.com/quinn-rs/quinn/commit/f74e6a8a15e5aa980044b7fa03a31878c6a8c65c): check a DATAGRAM frame's encoded size against `max_datagram_frame_size`, and drop rather than refuse one whose queue metadata overflows the receive buffer, so a datagram of the advertised maximum size no longer closes the connection.
- [`17596dde`](https://github.com/quinn-rs/quinn/commit/17596ddefb09dae895129520824055d0ac8da5d5) (`moq_sock::udp`): on Windows, query `IPV6_V6ONLY` only on IPv6 sockets, so Winsock refusing the option on an IPv4 socket cannot fail endpoint creation.
- [`d3174f1e`](https://github.com/quinn-rs/quinn/commit/d3174f1e77e093ceadfe0edff865fdd92d51a03c): a `wasm32-unknown-unknown` build pulls in ring only through the `ring` feature.
- [`f233510c`](https://github.com/quinn-rs/quinn/commit/f233510cf37e1be9511070bf743151736d621a5e): a disabled idle timeout no longer abandons every accept as stale. Does not apply: the fork drops a stale Initial after `transport::Config::handshake_timeout`, which cannot be disabled, rather than the idle timeout.
- [`6c69f9f4`](https://github.com/quinn-rs/quinn/commit/6c69f9f4ed2362002a0e2e5312a6dfa3ceb31c1d): stopping a reset stream no longer credits its unread data twice. Already held: `Recv::unread_credit` counts only what a reset still owes below its Reliable Size (see `RESET_STREAM_AT` below), and `stop_after_reset_credits_once` covers it.
- [`623a0369`](https://github.com/quinn-rs/quinn/commit/623a0369536b9a1e731a8629c80c164eb8f2e637) (moq-tokio's `quic::driver`): an endpoint on a specific IPv6 address is not made dual-stack, so Windows does not refuse the driver's IPv4 socket options. `moq_sock::bind::udp` already did this; the driver's tests now bind through it, with upstream's `specific_v6_addr`.

Checked through quinn `main` at [`2697de1e`](https://github.com/quinn-rs/quinn/commit/2697de1e1314cb9f98502b7323acd5bdd836b582) (2026-10-28), and the `0.11.x` branch through [`4b84837d`](https://github.com/quinn-rs/quinn/commit/4b84837df1d25424bc37b0ed990e7b376d40a9c0); start the next sync there.

The fork never merges upstream, and takes the workspace's formatting and names, so upstream patches no longer apply.
Upstream fixes are ported by hand, together with their regression tests.
Expand Down
37 changes: 30 additions & 7 deletions rs/moq-tokio/src/quic/driver/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ fn endpoint() -> Endpoint {
EndpointFactory::new().endpoint()
}

/// A dial-only endpoint on `addr`, dual-stack when the platform allows it for an IPv6 `addr`
/// A dial-only endpoint on `addr`, dual-stack when the platform allows it for an IPv6 wildcard
fn client_endpoint(addr: SocketAddr) -> Result<Endpoint, endpoint::Error> {
Endpoint::new(endpoint::Config::default(), bind(addr)?)
}
Expand All @@ -279,12 +279,7 @@ fn server_endpoint(config: server::Config, addr: SocketAddr) -> Result<Endpoint,
}

fn bind(addr: SocketAddr) -> io::Result<UdpSocket> {
let socket = socket2::Socket::new(socket2::Domain::for_address(addr), socket2::Type::DGRAM, None)?;
if addr.is_ipv6() {
let _ = socket.set_only_v6(false);
}
socket.bind(&addr.into())?;
Ok(socket.into())
moq_sock::bind::udp(moq_sock::bind::Udp::new(addr))
}

fn endpoint_with_config(transport_config: transport::Config) -> Endpoint {
Expand Down Expand Up @@ -688,6 +683,34 @@ fn echo_v6() {
});
}

/// Windows rejects the IPv4 options the driver sets on a dual-stack socket, so an endpoint on a
/// specific IPv6 address must be bound v6-only.
#[tokio::test]
#[cfg_attr(
any(target_os = "solaris", target_os = "illumos"),
ignore = "Fails on Solaris and Illumos"
)]
async fn specific_v6_addr() {
let _guard = subscribe();
let addr = SocketAddr::new(IpAddr::V6(Ipv6Addr::LOCALHOST), 0);

let cert = rcgen::generate_simple_self_signed(vec!["localhost".into()]).unwrap();
let key = PrivatePkcs8KeyDer::from(cert.signing_key.serialize_der());
let cert = CertificateDer::from(cert.cert);
let server_config = server::Config::with_single_cert(vec![cert.clone()], key.into()).unwrap();
let server = server_endpoint(server_config, addr).unwrap();

let mut roots = RootCertStore::empty();
roots.add(cert).unwrap();
let client = client_endpoint(addr).unwrap();
client.set_default_client_config(client::Config::with_root_certificates(Arc::new(roots)).unwrap());

tokio::join!(
async { server.accept().await.unwrap().accept().unwrap().await.unwrap() },
async { client.dial(server.local_addr(), "localhost").unwrap().await.unwrap() },
);
}

#[test]
#[cfg_attr(target_os = "solaris", ignore = "Sometimes hangs in poll() on Solaris")]
fn echo_v4() {
Expand Down