Skip to content

FreeBSD: Improve client's virtual network interface handling #1859

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

Merged
merged 6 commits into from
Jun 1, 2023

Conversation

metalefty
Copy link
Contributor

As a result of this PR, vpnclient functionality on FreeBSD has become more practical.

  • Don't hardcode prefix for UNIX virtual network interface
  • Make NicDelete work on FreeBSD
    • Virtual network interfaces are properly cleaned up when shutting down vpnclient
  • Make NIC state change (up/down) work on FreeBSD
    • Virtual network interface state is set to up when attempt to VPN server

Fixes: #1858

metalefty added 4 commits May 31, 2023 17:48
In contrast to Linux, FreeBSD's tap devices are still plumbed after fd
closed. The tap device must be destroyed in addition to closing fd
to delete virtual network interfaces used for VPN connection.

NicDelete command now works properly and virtual network interfaces used
by vpnclient are cleaned up when shutting down vpnclient.
The same trick also works on FreeBSD. There's no reason to limit it to
Linux.
@metalefty
Copy link
Contributor Author

@davidebeatrici Addressed you review comments. Also added missing prototype declaration.

@davidebeatrici davidebeatrici merged commit 0f689d9 into SoftEtherVPN:master Jun 1, 2023
@davidebeatrici
Copy link
Member

Thanks!

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.

FreeBSD: NicDelete is not working
3 participants