Sitelet https://github.com/RetroShare/RetroChess/pull/32
Skip to content

Presence: wait 2 minutes before reopening a closed contact tunnel - #32

Open
defnax wants to merge 2 commits into
mainfrom
tunnel_fix
Open

defnax wants to merge 2 commits into
mainfrom
tunnel_fix

Conversation

@defnax

@defnax defnax commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

Tunnel ids are the same for every connection between two identities. Reopening a just-closed tunnel after 15 s left the peer with the old session keys, so it dropped our packets ("packet HMAC does not match") and the contact looked offline. After a presence timeout or a remote close, redial no earlier than 120 s; incoming tunnels from the contact are still accepted.

Tunnel ids are the same for every connection between two identities.
Reopening a just-closed tunnel after 15 s left the peer with the old session
keys, so it dropped our packets ("packet HMAC does not match") and the
contact looked offline. After a presence timeout or a remote close, redial
no earlier than 120 s; incoming tunnels from the contact are still accepted.
…econd one

Before requesting a tunnel, look in GxsTunnel's list for one between the same
identities (incoming from the contact or being re-dug) and reuse it. Avoids a
second turtle tunnel and key exchange for the same tunnel id, which overwrote
the first key and caused "packet HMAC does not match" on both sides.
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