Skip to contentSkip to conversation

tapctl: support for ovpn-dco Windows driver

PATCH In review Lev Stipakov 3 participants 4 messages Apr 21, 2021 – Apr 25, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tapctl: support for ovpn-dco Windows driver

From: Lev Stipakov <[email protected]...>

Make tapctl aware of ovpn-dco.

---
 src/tapctl/main.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
src/tapctl/main.c +7 -6
index d5bc7290..3350bf1f 100644
@@ -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++)
Signature · 1 line
2.17.1
Acked-by on v1 1/1
#1 lore raw

Hi,

Quoted 52 lines · Lev Stipakov

From: Lev Stipakov <[email protected]...>

Make tapctl aware of ovpn-dco.

---
 src/tapctl/main.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
src/tapctl/main.c +0 -2
index d5bc7290..3350bf1f 100644
@@ -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")

src/tapctl/main.c +1 -1
-    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")

src/tapctl/main.c +3 -2
+    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")

src/tapctl/main.c create_delete_adapter: · line 282

Quoted 9 lines
src/tapctl/main.c +2 -1
@@ -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.

#2 lore raw

PATCH 1/1 tapctl: support for ovpn-dco Windows driver

(sourceforge seems to be refusing to accept mail from me.. sending again)

Hi,

Quoted 52 lines · Lev Stipakov

From: Lev Stipakov <[email protected]...>

Make tapctl aware of ovpn-dco.

---
 src/tapctl/main.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
src/tapctl/main.c +0 -2
index d5bc7290..3350bf1f 100644
@@ -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")

src/tapctl/main.c +1 -1
-    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")

src/tapctl/main.c +3 -2
+    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")

src/tapctl/main.c create_delete_adapter: · line 282

Quoted 9 lines
src/tapctl/main.c +2 -1
@@ -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.

#3 lore raw
In reply to Lev Stipakov

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 <[email protected]...>
     Acked-by: Selva Nair <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg22165.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering