Skip to content

More robust way to get a version info#76

Merged
lstipakov merged 1 commit intoOpenVPN:release/1from
lstipakov:get-version
Aug 12, 2024
Merged

More robust way to get a version info#76
lstipakov merged 1 commit intoOpenVPN:release/1from
lstipakov:get-version

Conversation

@lstipakov
Copy link
Copy Markdown
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 <lev@openvpn.net>
@lstipakov lstipakov requested review from d12fk and flichtenheld August 9, 2024 11:21
@cron2
Copy link
Copy Markdown

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
@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 <lev@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20240809192257.24208-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg29009.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
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 <lev@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20240809192257.24208-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg29009.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(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 <lev@openvpn.net>
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 <lev@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20240809192257.24208-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg29009.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
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