]> 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:29:14 +0000 (17:29 +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>
(cherry picked from commit 6e03336d8a4aada12c4950a9683a483470fe4f15)

src/openvpn/tun.c

index 75934140b87a7374be2aac3057e8ac857eae342c..63f9d1bf5908338469145886bca8ca3c2c158861 100644 (file)
@@ -3700,7 +3700,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);