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

More robust way to get a version info #76

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

lstipakov
Copy link
Member

The current way to get a version information is to open DCO device and make IOCTL call. This has a few issues:

  • If DCO device is already in use, an another app won't be to get the version, since the device is exclusive

  • With the multiple DCO devices there is a high chance that \.\ovpn-dco device, which we use to get version information, is already in use. To open another device, we use via device interface enumeration, which requires a lot of boilerplate code to work.

To make it easier for userspace to get the device version, create a non-exclusive control device \.\ovpn-dco-ver which supports single IOCTL to get the version number. This device is created when the first network device is created and removed with the last network device.

Bump version to 1.3.0.

#75

The current way to get a version information is to open DCO device and
make IOCTL call. This has a few issues:

 - If DCO device is already in use, an another app won't be to get the
version, since the device is exclusive

 - With the multiple DCO devices there is a high chance that \\.\ovpn-dco
device, which we use to get version information, is already in use. To
open another device, we use via device interface enumeration, which
requires a lot of boilerplate code to work.

To make it easier for userspace to get the device version, create
a non-exclusive control device \\.\ovpn-dco-ver which supports single IOCTL
to get the version number. This device is created when the first
network device is created and removed with the last network device.

Bump version to 1.3.0.

OpenVPN#75

Signed-off-by: Lev Stipakov <[email protected]>
@cron2
Copy link

cron2 commented Aug 9, 2024

from a high-level "stare at code" this looks all good to me (and is a useful change)

@lstipakov lstipakov requested a review from cron2 August 12, 2024 05:32
@lstipakov lstipakov merged commit f4adb27 into OpenVPN:release/1 Aug 12, 2024
24 checks passed
@lstipakov lstipakov deleted the get-version branch August 12, 2024 05:40
cron2 pushed a commit to cron2/openvpn that referenced this pull request Aug 13, 2024
The current way doesn't work if the device is already in use.

Starting from 1.3.0, dco-win creates a non-exclusive
control device \\.\ovpn-dco-ver which can be opened by
multiple apps and supports a single IOCTL to get
a version number.

OpenVPN/ovpn-dco-win#76

This will be expecially handy later when checking which
features driver supports.

Change-Id: Ieb6f3a9d14d76000c1caf8ee1e959c6d0de832bf
Signed-off-by: Lev Stipakov <[email protected]>
Acked-by: Gert Doering <[email protected]>
Message-Id: <[email protected]>
URL: https://www.mail-archive.com/[email protected]/msg29009.html
Signed-off-by: Gert Doering <[email protected]>
cron2 pushed a commit to cron2/openvpn that referenced this pull request Aug 13, 2024
The current way doesn't work if the device is already in use.

Starting from 1.3.0, dco-win creates a non-exclusive
control device \\.\ovpn-dco-ver which can be opened by
multiple apps and supports a single IOCTL to get
a version number.

OpenVPN/ovpn-dco-win#76

This will be expecially handy later when checking which
features driver supports.

Change-Id: Ieb6f3a9d14d76000c1caf8ee1e959c6d0de832bf
Signed-off-by: Lev Stipakov <[email protected]>
Acked-by: Gert Doering <[email protected]>
Message-Id: <[email protected]>
URL: https://www.mail-archive.com/[email protected]/msg29009.html
Signed-off-by: Gert Doering <[email protected]>
(cherry picked from commit e5a8ea3)
lstipakov added a commit to lstipakov/openvpn that referenced this pull request Aug 13, 2024
The current way doesn't work if the device is already in use.

Starting from 1.3.0, dco-win creates a non-exclusive
control device \\.\ovpn-dco-ver which can be opened by
multiple apps and supports a single IOCTL to get
a version number.

OpenVPN/ovpn-dco-win#76

This will be expecially handy later when checking which
features driver supports.

Change-Id: Ieb6f3a9d14d76000c1caf8ee1e959c6d0de832bf
Signed-off-by: Lev Stipakov <[email protected]>
mrbff pushed a commit to mandelbitdev/openvpn that referenced this pull request Sep 9, 2024
The current way doesn't work if the device is already in use.

Starting from 1.3.0, dco-win creates a non-exclusive
control device \\.\ovpn-dco-ver which can be opened by
multiple apps and supports a single IOCTL to get
a version number.

OpenVPN/ovpn-dco-win#76

This will be expecially handy later when checking which
features driver supports.

Change-Id: Ieb6f3a9d14d76000c1caf8ee1e959c6d0de832bf
Signed-off-by: Lev Stipakov <[email protected]>
Acked-by: Gert Doering <[email protected]>
Message-Id: <[email protected]>
URL: https://www.mail-archive.com/[email protected]/msg29009.html
Signed-off-by: Gert Doering <[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 this pull request may close these issues.

2 participants