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.5_beta1~360 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e03336d8a4aada12c4950a9683a483470fe4f15;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 --- diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 12e6eb006..196f7c1ac 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -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);