]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Detect TAP interfaces with root-enumerated hardware ID
authorSimon Rozman <simon@rozman.si>
Tue, 16 Oct 2018 10:26:27 +0000 (12:26 +0200)
committerGert Doering <gert@greenie.muc.de>
Thu, 17 Jan 2019 16:27:49 +0000 (17:27 +0100)
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>
src/openvpn/tun.c

index 12e6eb0065ceef32cf732d4ab10e37ff91524302..196f7c1acc03ba4f529e9262e121539524d31b1d 100644 (file)
@@ -3525,7 +3525,8 @@ get_tap_reg(struct gc_arena *gc)
 
                 if (status == ERROR_SUCCESS && data_type == REG_SZ)
                 {
-                    if (!strcmp(component_id, TAP_WIN_COMPONENT_ID))
+                    if (!strcmp(component_id, TAP_WIN_COMPONENT_ID) ||
+                        !strcmp(component_id, "root\\" TAP_WIN_COMPONENT_ID))
                     {
                         struct tap_reg *reg;
                         ALLOC_OBJ_CLEAR_GC(reg, struct tap_reg, gc);