Skip to content

fix(proto): a connection closed in the Initial space is not handshake-confirmed - #931

Open
PQCrypta wants to merge 1 commit into
n0-computer:mainfrom
PQCrypta:handshake-confirmed-initial
Open

PQCrypta wants to merge 1 commit into
n0-computer:mainfrom
PQCrypta:handshake-confirmed-initial

Conversation

@PQCrypta

@PQCrypta PQCrypta commented Dec 4, 2026

Copy link
Copy Markdown

Description

Closes #920.

is_handshake_confirmed() now also requires the Initial keys to be gone. A connection refused in its first flight never had Handshake keys, so once it closed it counted as confirmed, and peer_may_probe(), peer_may_migrate() and local_ip_may_migrate() treated it as established.

New test closed_in_initial_space_is_not_handshake_confirmed: the server refuses a two-datagram ClientHello (no ALPN in common) in the Initial space. It isn't confirmed and drops a datagram from another address, and a client that closes in the Initial space isn't confirmed either. The test fails without the change.

API Changes

None.

Notes & open questions

The test waits out the pacer for the ClientHello's second datagram, so it keeps working once #922 lands.

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All API changes documented.
  • cargo make passes locally.

…-confirmed

`is_handshake_confirmed()` also requires the Initial keys to be gone, so a
connection refused in its first flight, which never had Handshake keys,
is no longer treated as confirmed by `peer_may_probe()`,
`peer_may_migrate()` and `local_ip_may_migrate()`.

Closes n0-computer#920
@n0bot n0bot Bot added this to iroh Dec 4, 2026
@github-project-automation github-project-automation Bot moved this to 🚑 Needs Triage in iroh Dec 4, 2026

This branch has not been deployed

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

Labels

None yet

Projects

Status: 🚑 Needs Triage

Development

Successfully merging this pull request may close these issues.

noq-proto: a connection that closed in the Initial space counts as handshake-confirmed

2 participants