Skip to content

Avoid serial address timeouts with bounded connection racing - #10

Open
ddidderr wants to merge 2 commits into
review/tofu-identityfrom
review/address-racing
Open

ddidderr wants to merge 2 commits into
review/tofu-identityfrom
review/address-racing

Conversation

@ddidderr

@ddidderr ddidderr commented Sep 6, 2026

Copy link
Copy Markdown
Owner

A silent first address previously consumed the full connect timeout before qsh tried a reachable address. Start a second attempt after 250 ms, interleave IPv6/IPv4 addresses, and keep at most two application connection attempts active. Each retains its full configured timeout. Failed attempts allow the next address to start immediately; observed host-key mismatches remain fatal.

Use the same bounded race for anonymous first-contact probes and authenticated pinned connections. Each probe owns fresh verifier state. Cancelling losers aborts and awaits their application tasks, dropping their independent connection/endpoint handles; Quinn retains its normal transport draining behavior.

Stacked on #7, following #3 and CI prerequisite #8.

Validation: full Ubuntu CI passed on 672b9e9 (run 34017696676), including rustfmt, pedantic clippy, stable/MSRV tests, root end-to-end tests, workflow/MSRV checks and dependency audit. Regression tests cover a real silent UDP address before a mandatory-mTLS server for both first contact and pinned connection, cancellation of a stalled loser, fatal-key-error short circuit, and the concurrency bound. Confidentiality, changed-key and refusal regressions continue to pass. Independent read-only review found no concrete bypass or regression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant