[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
Draft
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
☑️ Definition of Done checklist