Browse code

Detect TAP interfaces with root-enumerated hardware ID

This patch extends the TAP interface enumerating to detect the TAP
interfaces registered using "root\tap0901" hardware ID. Before, only TAP
interfaces with legacy "tap0901" HWID were detected by openvpn.exe.

The openvpnmsica.dll and tapctl.exe install TAP interfaces using root-
enumerated HWIDs, and were not detected by openvpn.exe.
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20181016102627.18676-5-simon@rozman.si>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg17762.html

Signed-off-by: Gert Doering <gert@greenie.muc.de>

Simon Rozman authored on 2018/10/16 19:26:27
Showing 1 changed files
... ...
@@ -3525,7 +3525,8 @@ get_tap_reg(struct gc_arena *gc)
3525 3525
 
3526 3526
                 if (status == ERROR_SUCCESS && data_type == REG_SZ)
3527 3527
                 {
3528
-                    if (!strcmp(component_id, TAP_WIN_COMPONENT_ID))
3528
+                    if (!strcmp(component_id, TAP_WIN_COMPONENT_ID) ||
3529
+                        !strcmp(component_id, "root\\" TAP_WIN_COMPONENT_ID))
3529 3530
                     {
3530 3531
                         struct tap_reg *reg;
3531 3532
                         ALLOC_OBJ_CLEAR_GC(reg, struct tap_reg, gc);