From patchwork Mon Oct 15 23:26:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Rozman X-Patchwork-Id: 555 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director9.mail.ord1d.rsapps.net ([172.31.255.6]) by backend30.mail.ord1d.rsapps.net with LMTP id YOcTMSi9xVu1eAAAIUCqbw for ; Tue, 16 Oct 2018 06:27:52 -0400 Received: from proxy7.mail.iad3b.rsapps.net ([172.31.255.6]) by director9.mail.ord1d.rsapps.net with LMTP id mNOILii9xVucbQAAalYnBA ; Tue, 16 Oct 2018 06:27:52 -0400 Received: from smtp33.gate.iad3b ([172.31.255.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy7.mail.iad3b.rsapps.net with LMTP id sC+dKCi9xVsaDQAAQkQ5tQ ; Tue, 16 Oct 2018 06:27:52 -0400 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp33.gate.iad3b.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dkim=fail (signature verification failed) header.d=rozman.si; dmarc=fail (p=none; dis=none) header.from=rozman.si X-Suspicious-Flag: YES X-Classification-ID: 22d2e888-d12e-11e8-a925-525400fb5834-1-1 Received: from [216.105.38.7] ([216.105.38.7:48204] helo=lists.sourceforge.net) by smtp33.gate.iad3b.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id AC/7D-30416-82DB5CB5; Tue, 16 Oct 2018 06:27:52 -0400 Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1gCMYq-0006qa-Mq; Tue, 16 Oct 2018 10:26:48 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1gCMYp-0006q9-11 for openvpn-devel@lists.sourceforge.net; Tue, 16 Oct 2018 10:26:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=20M64mkV04otVaJko6LpE/NzJM0AFoXnn4q+Jf3+GDs=; b=glKY9M0+y99RH98HLQkpejJyEk SWglzYwraFdRVmyvrruSXpB/FkVO/SUs8TeKP2o8H8OJ1yrxA4nQ4lw8XoGJ2yMgIUhGFg9bdS7aC 1oh+8FAmoK8WlXIjlOH+pINt0PFrkPPdt/Z1ixvAMHH0wmnolQhKtnF0OOzYA1shkvG4=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=20M64mkV04otVaJko6LpE/NzJM0AFoXnn4q+Jf3+GDs=; b=UviUwFMquHSpgpPOxSxHc/Tr9D 0b+ldEVEeKMJaIfjmQURpxqAhogHwwtQ8aNTGBJsuCTw6g6UX6Tb/nBnEA5EfiRHNdMFA1NtiZJMV j3mjrABSxAKCxiMwHijJ+GZR0rqlKQ674pt6oAkQjEmCpI86hkqnF1glQqMiVJRaU8dY=; Received: from pub5.amebis.si ([213.250.55.21]) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) id 1gCMYn-002g29-5t for openvpn-devel@lists.sourceforge.net; Tue, 16 Oct 2018 10:26:46 +0000 Received: from s0.selo.doma (unknown [213.250.22.160]) by pub5.amebis.si (Postfix) with ESMTPS id 331A620D96 for ; Tue, 16 Oct 2018 12:26:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=rozman.si; s=default; t=1539685598; bh=CDX946L3t8+Hjy/cpgSD+ucoRvdmu6zXIK8WpYnWQ8Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QsVxVvvRrJNQFkRwDSr9ykAbkYAaCAppz6I3H9yMK6NxmVF0LiY7JFypOkTkLTQ4V wExGTeRAcqb4XwIBgyH4IOBhx59J6hrrmC3AqkqO3oMZK2CLXp8SQmDFjbORtfXYLM VSSJZC4sT2onsIDH8yddV4CXMOZAO5e1nQ2c18tQ= Received: from s0.selo.doma ([127.0.0.1]) by s0.selo.doma with Microsoft SMTPSVC(10.0.14393.0); Tue, 16 Oct 2018 12:26:38 +0200 From: Simon Rozman To: openvpn-devel@lists.sourceforge.net Date: Tue, 16 Oct 2018 12:26:27 +0200 Message-Id: <20181016102627.18676-5-simon@rozman.si> X-Mailer: git-send-email 2.19.0.windows.1 In-Reply-To: <20181016102627.18676-1-simon@rozman.si> References: <20181010192337.6984-1-simon@rozman.si> <20181016102627.18676-1-simon@rozman.si> MIME-Version: 1.0 X-OriginalArrivalTime: 16 Oct 2018 10:26:38.0081 (UTC) FILETIME=[B8A35F10:01D4653A] X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-Headers-End: 1gCMYn-002g29-5t Subject: [Openvpn-devel] [PATCH 5/5] Detect TAP interfaces with root-enumerated hardware ID X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox 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 --- src/openvpn/tun.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 948fd17d..5fde2ab8 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -3524,7 +3524,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);