Thanks to visit codestin.com
Credit goes to github.com

Skip to content

The TUN code in coder/coder should fail early if there is no wintun.dll #24

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

Closed
deansheather opened this issue Feb 17, 2025 · 0 comments · Fixed by coder/coder#16707
Closed

Comments

@deansheather
Copy link
Member

Currently it will just permanently hang

gcp-cherry-pick-bot bot pushed a commit to coder/coder that referenced this issue Feb 28, 2025
Prevents the VPN startup from hanging for 5 minutes due to a startup
backoff if `wintun.dll` cannot be loaded.

Because the `wintun` package doesn't expose an easy `Load() error`
method for us, the only way for us to force it to load (without unwanted
side effects) is through `wintun.Version()` which doesn't return an
error message.

So, we call that function so the `wintun` package loads the DLL and
configures the logging properly, then we try to load the DLL ourselves.
`LoadLibraryEx` will not load the library multiple times and returns a
reference to the existing library.

Closes coder/coder-desktop-windows#24
matifali pushed a commit to coder/coder that referenced this issue Feb 28, 2025
#16738)

Cherry-picked fix(vpn): fail early if wintun.dll is not present (#16707)

Prevents the VPN startup from hanging for 5 minutes due to a startup
backoff if `wintun.dll` cannot be loaded.

Because the `wintun` package doesn't expose an easy `Load() error`
method for us, the only way for us to force it to load (without unwanted
side effects) is through `wintun.Version()` which doesn't return an
error message.

So, we call that function so the `wintun` package loads the DLL and
configures the logging properly, then we try to load the DLL ourselves.
`LoadLibraryEx` will not load the library multiple times and returns a
reference to the existing library.

Closes coder/coder-desktop-windows#24

Co-authored-by: Dean Sheather <[email protected]>
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 a pull request may close this issue.

1 participant