Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenVPN: Resolve issues with long negotiations #1094

Merged
merged 7 commits into from
Jan 22, 2025

Conversation

keeshux
Copy link
Member

@keeshux keeshux commented Jan 22, 2025

Clean up the naive abuse of async/await in OpenVPNSession. Encapsulate the instances of ControlChannel/DataChannel inside the Negotiator actor, so that actor-isolation for them becomes automatically unnecessary. Synchronous methods inside the actor are the way to go.

After that, handle control packets in orderly fashion, because this is not being done and may spoil negotiation very easily. Probably also happening in TunnelKit.

Ultimately, skip some unnecessary XOR processing in UDP when no XOR method is actually set.

- ControlChannel
- DataChannel

Private instances inside Negotiator actor. Safe.
FIXME: sure about non-blocking writes?
OpenVPNSession.receiveLink() is reentrant.
Retain reason when throwing .linkFailure
@keeshux keeshux self-assigned this Jan 22, 2025
@keeshux keeshux added the regression Used to work but doesn't anymore label Jan 22, 2025
@keeshux keeshux added this to the Hotfixes for v3 milestone Jan 22, 2025
@keeshux keeshux merged commit 8ab7b0d into master Jan 22, 2025
@keeshux keeshux deleted the bugfix/openvpn-negotiation-concurrency branch January 22, 2025 21:33
keeshux added a commit that referenced this pull request Feb 10, 2025
Tie OpenVPN internals to the same global actor OpenVPNActor.

Regression in #1094
Fixes #1137
keeshux added a commit that referenced this pull request Feb 10, 2025
Tie OpenVPN internals to the same global actor OpenVPNActor.

Regression in #1094
Fixes #1137
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OpenVPN regression Used to work but doesn't anymore
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant