Skip to content

Fix relay re-establishment for handshake on Disestablised entry - #1805

Merged
johnmaguire merged 1 commit into
slackhq:masterfrom
johnmaguire:relay-handshake-fix
Jul 17, 2026
Merged

Fix relay re-establishment for handshake on Disestablised entry#1805
johnmaguire merged 1 commit into
slackhq:masterfrom
johnmaguire:relay-handshake-fix

Conversation

@johnmaguire

Copy link
Copy Markdown
Collaborator

handleOutsideRelayPacket filled ViaSender.remoteIdx with relay.RemoteIndex,
an index from the relay peer's index space, but the rescue in
sendHandshakeResponse looks that value up in relayForByIdx, which is keyed
by local index. The lookup could never hit, so a terminal relay entry left
Disestablished by a one-sided teardown stayed Disestablished even after a
valid handshake arrived over it. The responder's first transmit then failed
to find an Established relay, deleted its only relay entry, and every
subsequent send was silently dropped until dead-tunnel detection forced a
re-handshake.

…ed entry

handleOutsideRelayPacket filled ViaSender.remoteIdx with relay.RemoteIndex,
an index from the relay peer's index space, but the rescue in
sendHandshakeResponse looks that value up in relayForByIdx, which is keyed
by local index. The lookup could never hit, so a terminal relay entry left
Disestablished by a one-sided teardown stayed Disestablished even after a
valid handshake arrived over it. The responder's first transmit then failed
to find an Established relay, deleted its only relay entry, and every
subsequent send was silently dropped until dead-tunnel detection forced a
re-handshake.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread outside.go
via = ViaSender{
UdpAddr: via.UdpAddr,
relayHI: hostinfo,
remoteIdx: relay.RemoteIndex,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, this doesn't match the comment of the field in the struct. It was supposed to be the idx from the packet, not the relay's remote index.

@johnmaguire
johnmaguire merged commit e290a68 into slackhq:master Jul 17, 2026
23 checks passed
@nbrownus nbrownus added this to the v1.11.0 milestone Jul 17, 2026
@nbrownus nbrownus mentioned this pull request Jul 23, 2026
56 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants