From: Simon Rozman Date: Tue, 16 Oct 2018 10:26:27 +0000 (+0200) Subject: Detect TAP interfaces with root-enumerated hardware ID X-Git-Tag: v2.4.7~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eef040cc909bb0e9bae793b61c2f4f0da7e109d5;p=thirdparty%2Fopenvpn.git 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 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 (cherry picked from commit 6e03336d8a4aada12c4950a9683a483470fe4f15) --- diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 75934140b..63f9d1bf5 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -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);