Skip to content

[LLT-6783] rotate wg nt listen port when handshake fails and perform wg traceroute#1590

Draft
Jauler wants to merge 4 commits intorelease/v5.4from
LLT-6783_rotate_wg_nt_listen_port_when_handshake_fails_wg_traceroute
Draft

[LLT-6783] rotate wg nt listen port when handshake fails and perform wg traceroute#1590
Jauler wants to merge 4 commits intorelease/v5.4from
LLT-6783_rotate_wg_nt_listen_port_when_handshake_fails_wg_traceroute

Conversation

@Jauler
Copy link
Contributor

@Jauler Jauler commented Nov 18, 2025

☑️ Definition of Done checklist

  • Commit history is clean (requirements)
  • README.md is updated
  • Functionality is covered by unit or integration tests

In a lengthy investigation on ocassional loss of connection we observed
that for some reason sometimes the client enters the state where it is
sending WireGuard packets towards the server, but they are not received
by the server's kernel module. Likely being dropped somewhere by
middle-hops. At the same time we observed that packets going to
different server at the time of the issue - does actually reach them,
and suspicion is that packets even to the same server, but coming from
the different source port will reach the server as well. As it will look
like "new" UDP flow to all the middle box'es, their conntrack's and so
on.

This commit adds an experimental functionality, which hooks onto WG-NT
driver logs and whenever there are at least two server-side handshakes
in a rather quick succession (10 seconds) it triggers client-side source
port change.

If such a change will recover the connectivity (expected timeout for
connectivity recovery is roughly 20-30s) then it kind of confirms the
suspicions about UDP packet flow getting corrupted somehwere down the
middle (we have captures on the client-side showing, that packets are
actually leaving the device).
@Jauler Jauler changed the base branch from main to release/v5.4 November 18, 2025 13:22
@Jauler Jauler marked this pull request as draft November 20, 2025 12:56
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