[Openvpn-devel] tapctl: support for ovpn-dco Windows driver

Message ID 20210421080016.110-1-lstipakov@gmail.com
State Accepted
Headers show
Series
  • [Openvpn-devel] tapctl: support for ovpn-dco Windows driver
Related show

Commit Message

Lev Stipakov April 21, 2021, 8 a.m.
From: Lev Stipakov <lev@openvpn.net>

Make tapctl aware of ovpn-dco.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
---
 src/tapctl/main.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

Comments

Selva Nair April 23, 2021, 4:13 a.m. | #1
Hi,

On Wed, Apr 21, 2021 at 4:02 AM Lev Stipakov <lstipakov@gmail.com> wrote:

> From: Lev Stipakov <lev@openvpn.net>
>
> Make tapctl aware of ovpn-dco.
>
> Signed-off-by: Lev Stipakov <lev@openvpn.net>
> ---
>  src/tapctl/main.c | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/src/tapctl/main.c b/src/tapctl/main.c
> index d5bc7290..3350bf1f 100644
> --- a/src/tapctl/main.c
> +++ b/src/tapctl/main.c
> @@ -81,9 +81,9 @@ static const TCHAR usage_message_create[] =
>      TEXT("               specified, a default adapter name is chosen by
> Windows.         \n")
>      TEXT("               Note: This name can also be specified as
> OpenVPN's --dev-node   \n")
>      TEXT("               option.
>                \n")
> -    TEXT("--hwid <hwid>  Adapter hardware ID. Default value is
> root\\tap0901, which       \n")
> -    TEXT("               describes tap-windows6 driver. To work with
> wintun driver,      \n")
> -    TEXT("               specify 'wintun'.
>                \n")
> +    TEXT("--hwid <hwid>  Adapter hardware ID. Default value is
> root\\tap0901, which      \n")
> +    TEXT("               describes tap-windows6 driver. To work with
> wintun or ovpn-dco  \n")
> +    TEXT("               driver, specify 'wintun' or 'ovpn-dco'.
>                \n")
>      TEXT("\n")
>      TEXT("Output:\n")
>      TEXT("\n")
> @@ -101,8 +101,8 @@ static const TCHAR usage_message_list[] =
>      TEXT("\n")
>      TEXT("Options:\n")
>      TEXT("\n")
> -    TEXT("--hwid <hwid>  Adapter hardware ID. By default, root\\tap0901,
> tap0901 and      \n")
> -    TEXT("               wintun adapters are listed. Use this switch to
> limit the list.  \n")
> +    TEXT("--hwid <hwid>  Adapter hardware ID. By default, root\\tap0901,
> tap0901, wintun and \n")
> +    TEXT("               ovpn-dco adapters are listed. Use this switch to
> limit the list.\n")
>      TEXT("\n")
>      TEXT("Output:\n")
>      TEXT("\n")
> @@ -275,7 +275,8 @@ create_delete_adapter:
>          TCHAR szzHwId[0x100] =
>              TEXT("root\\") TEXT(TAP_WIN_COMPONENT_ID) TEXT("\0")
>              TEXT(TAP_WIN_COMPONENT_ID) TEXT("\0")
> -            TEXT("Wintun\0");
> +            TEXT("Wintun\0")
> +            TEXT("ovpn-dco\0");
>
>          /* Parse options. */
>          for (int i = 2; i < argc; i++)
>

Looks good, assuming ovpn-dco is the correct hwid for the new driver.

Acked-by: selva.nair@gmail.com
<div dir="ltr"><div dir="ltr">Hi,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 21, 2021 at 4:02 AM Lev Stipakov &lt;<a href="mailto:lstipakov@gmail.com">lstipakov@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">From: Lev Stipakov &lt;<a href="mailto:lev@openvpn.net" target="_blank">lev@openvpn.net</a>&gt;<br>
<br>
Make tapctl aware of ovpn-dco.<br>
<br>
Signed-off-by: Lev Stipakov &lt;<a href="mailto:lev@openvpn.net" target="_blank">lev@openvpn.net</a>&gt;<br>
---<br>
 src/tapctl/main.c | 13 +++++++------<br>
 1 file changed, 7 insertions(+), 6 deletions(-)<br>
<br>
diff --git a/src/tapctl/main.c b/src/tapctl/main.c<br>
index d5bc7290..3350bf1f 100644<br>
--- a/src/tapctl/main.c<br>
+++ b/src/tapctl/main.c<br>
@@ -81,9 +81,9 @@ static const TCHAR usage_message_create[] =<br>
     TEXT(&quot;               specified, a default adapter name is chosen by Windows.         \n&quot;)<br>
     TEXT(&quot;               Note: This name can also be specified as OpenVPN&#39;s --dev-node   \n&quot;)<br>
     TEXT(&quot;               option.                                                         \n&quot;)<br>
-    TEXT(&quot;--hwid &lt;hwid&gt;  Adapter hardware ID. Default value is root\\tap0901, which       \n&quot;)<br>
-    TEXT(&quot;               describes tap-windows6 driver. To work with wintun driver,      \n&quot;)<br>
-    TEXT(&quot;               specify &#39;wintun&#39;.                                               \n&quot;)<br>
+    TEXT(&quot;--hwid &lt;hwid&gt;  Adapter hardware ID. Default value is root\\tap0901, which      \n&quot;)<br>
+    TEXT(&quot;               describes tap-windows6 driver. To work with wintun or ovpn-dco  \n&quot;)<br>
+    TEXT(&quot;               driver, specify &#39;wintun&#39; or &#39;ovpn-dco&#39;.                         \n&quot;)<br>
     TEXT(&quot;\n&quot;)<br>
     TEXT(&quot;Output:\n&quot;)<br>
     TEXT(&quot;\n&quot;)<br>
@@ -101,8 +101,8 @@ static const TCHAR usage_message_list[] =<br>
     TEXT(&quot;\n&quot;)<br>
     TEXT(&quot;Options:\n&quot;)<br>
     TEXT(&quot;\n&quot;)<br>
-    TEXT(&quot;--hwid &lt;hwid&gt;  Adapter hardware ID. By default, root\\tap0901, tap0901 and      \n&quot;)<br>
-    TEXT(&quot;               wintun adapters are listed. Use this switch to limit the list.  \n&quot;)<br>
+    TEXT(&quot;--hwid &lt;hwid&gt;  Adapter hardware ID. By default, root\\tap0901, tap0901, wintun and \n&quot;)<br>
+    TEXT(&quot;               ovpn-dco adapters are listed. Use this switch to limit the list.\n&quot;)<br>
     TEXT(&quot;\n&quot;)<br>
     TEXT(&quot;Output:\n&quot;)<br>
     TEXT(&quot;\n&quot;)<br>
@@ -275,7 +275,8 @@ create_delete_adapter:<br>
         TCHAR szzHwId[0x100] =<br>
             TEXT(&quot;root\\&quot;) TEXT(TAP_WIN_COMPONENT_ID) TEXT(&quot;\0&quot;)<br>
             TEXT(TAP_WIN_COMPONENT_ID) TEXT(&quot;\0&quot;)<br>
-            TEXT(&quot;Wintun\0&quot;);<br>
+            TEXT(&quot;Wintun\0&quot;)<br>
+            TEXT(&quot;ovpn-dco\0&quot;);<br>
<br>
         /* Parse options. */<br>
         for (int i = 2; i &lt; argc; i++)<br></blockquote><div><br></div><div>Looks good, assuming ovpn-dco is the correct hwid for the new driver.</div><div><br></div><div>Acked-by: <a href="mailto:selva.nair@gmail.com">selva.nair@gmail.com</a></div></div></div>
Selva Nair April 24, 2021, 2:25 p.m. | #2
(sourceforge seems to be refusing to accept mail from me.. sending again)

Hi,

On Wed, Apr 21, 2021 at 4:02 AM Lev Stipakov <lstipakov@gmail.com> wrote:

> From: Lev Stipakov <lev@openvpn.net>
>
> Make tapctl aware of ovpn-dco.
>
> Signed-off-by: Lev Stipakov <lev@openvpn.net>
> ---
>  src/tapctl/main.c | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/src/tapctl/main.c b/src/tapctl/main.c
> index d5bc7290..3350bf1f 100644
> --- a/src/tapctl/main.c
> +++ b/src/tapctl/main.c
> @@ -81,9 +81,9 @@ static const TCHAR usage_message_create[] =
>      TEXT("               specified, a default adapter name is chosen by
> Windows.         \n")
>      TEXT("               Note: This name can also be specified as
> OpenVPN's --dev-node   \n")
>      TEXT("               option.
>                \n")
> -    TEXT("--hwid <hwid>  Adapter hardware ID. Default value is
> root\\tap0901, which       \n")
> -    TEXT("               describes tap-windows6 driver. To work with
> wintun driver,      \n")
> -    TEXT("               specify 'wintun'.
>                \n")
> +    TEXT("--hwid <hwid>  Adapter hardware ID. Default value is
> root\\tap0901, which      \n")
> +    TEXT("               describes tap-windows6 driver. To work with
> wintun or ovpn-dco  \n")
> +    TEXT("               driver, specify 'wintun' or 'ovpn-dco'.
>                \n")
>      TEXT("\n")
>      TEXT("Output:\n")
>      TEXT("\n")
> @@ -101,8 +101,8 @@ static const TCHAR usage_message_list[] =
>      TEXT("\n")
>      TEXT("Options:\n")
>      TEXT("\n")
> -    TEXT("--hwid <hwid>  Adapter hardware ID. By default, root\\tap0901,
> tap0901 and      \n")
> -    TEXT("               wintun adapters are listed. Use this switch to
> limit the list.  \n")
> +    TEXT("--hwid <hwid>  Adapter hardware ID. By default, root\\tap0901,
> tap0901, wintun and \n")
> +    TEXT("               ovpn-dco adapters are listed. Use this switch to
> limit the list.\n")
>      TEXT("\n")
>      TEXT("Output:\n")
>      TEXT("\n")
> @@ -275,7 +275,8 @@ create_delete_adapter:
>          TCHAR szzHwId[0x100] =
>              TEXT("root\\") TEXT(TAP_WIN_COMPONENT_ID) TEXT("\0")
>              TEXT(TAP_WIN_COMPONENT_ID) TEXT("\0")
> -            TEXT("Wintun\0");
> +            TEXT("Wintun\0")
> +            TEXT("ovpn-dco\0");
>
>          /* Parse options. */
>          for (int i = 2; i < argc; i++)
>

Looks good, assuming ovpn-dco is the correct hwid for the new driver.

Acked-by: selva.nair@gmail.com
Gert Doering April 25, 2021, 8:19 a.m. | #3
I've not tested this further, just stared at the code a bit (looks good),
and of course Selva's ACK :-) - and yeah, let's hope the mailing list
will unblock soonish...

Your patch has been applied to the master branch.

commit 1e25f9792fc955ef4e333afb5259b3f669f62355
Author: Lev Stipakov
Date:   Wed Apr 21 11:00:16 2021 +0300

     tapctl: support for ovpn-dco Windows driver

     Signed-off-by: Lev Stipakov <lev@openvpn.net>
     Acked-by: Selva Nair <selva.nair@gmail.com>
     Message-Id: <20210421080016.110-1-lstipakov@gmail.com>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22165.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/src/tapctl/main.c b/src/tapctl/main.c
index d5bc7290..3350bf1f 100644
--- a/src/tapctl/main.c
+++ b/src/tapctl/main.c
@@ -81,9 +81,9 @@  static const TCHAR usage_message_create[] =
     TEXT("               specified, a default adapter name is chosen by Windows.         \n")
     TEXT("               Note: This name can also be specified as OpenVPN's --dev-node   \n")
     TEXT("               option.                                                         \n")
-    TEXT("--hwid <hwid>  Adapter hardware ID. Default value is root\\tap0901, which       \n")
-    TEXT("               describes tap-windows6 driver. To work with wintun driver,      \n")
-    TEXT("               specify 'wintun'.                                               \n")
+    TEXT("--hwid <hwid>  Adapter hardware ID. Default value is root\\tap0901, which      \n")
+    TEXT("               describes tap-windows6 driver. To work with wintun or ovpn-dco  \n")
+    TEXT("               driver, specify 'wintun' or 'ovpn-dco'.                         \n")
     TEXT("\n")
     TEXT("Output:\n")
     TEXT("\n")
@@ -101,8 +101,8 @@  static const TCHAR usage_message_list[] =
     TEXT("\n")
     TEXT("Options:\n")
     TEXT("\n")
-    TEXT("--hwid <hwid>  Adapter hardware ID. By default, root\\tap0901, tap0901 and      \n")
-    TEXT("               wintun adapters are listed. Use this switch to limit the list.  \n")
+    TEXT("--hwid <hwid>  Adapter hardware ID. By default, root\\tap0901, tap0901, wintun and \n")
+    TEXT("               ovpn-dco adapters are listed. Use this switch to limit the list.\n")
     TEXT("\n")
     TEXT("Output:\n")
     TEXT("\n")
@@ -275,7 +275,8 @@  create_delete_adapter:
         TCHAR szzHwId[0x100] =
             TEXT("root\\") TEXT(TAP_WIN_COMPONENT_ID) TEXT("\0")
             TEXT(TAP_WIN_COMPONENT_ID) TEXT("\0")
-            TEXT("Wintun\0");
+            TEXT("Wintun\0")
+            TEXT("ovpn-dco\0");
 
         /* Parse options. */
         for (int i = 2; i < argc; i++)