From patchwork Thu Feb 16 16:01:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lev Stipakov X-Patchwork-Id: 3086 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:c95:b0:82:e4b3:40a0 with SMTP id p21csp608463dyk; Thu, 16 Feb 2023 08:02:30 -0800 (PST) X-Google-Smtp-Source: AK7set+r3L5ghuLyYBUWYiOroEapgdni3QN5EAzTxWzt0YipdaJhCnKVqI9eioFqEUrBGXXh8k26 X-Received: by 2002:aa7:9acc:0:b0:5a8:aa9c:8524 with SMTP id x12-20020aa79acc000000b005a8aa9c8524mr5379906pfp.10.1676563350717; Thu, 16 Feb 2023 08:02:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676563350; cv=none; d=google.com; s=arc-20160816; b=wdl5dpzyJ49cXT3hSLqPVcDM8XLq2MPNACfGwiTPLjhMv4gCWuaII6dBNunbK+hFkZ P+nGKLmfi6hlvX7Qq7O8rAtYAG9KqM9MNJH2inGXCiZ0ufgU6/xwsvPcmZhf+TcDlD0u +fnSMiCkTQzf7j05B7JvLXwQh32H8IYOvEihbiPttHnPLxh28Ba3YZT6YTx+VGwat8XM X+2cn3+9jaDpdzp9PkKSvcpdSc8ZDUHyYmcO3La8TZiTxeARJ9houOMG0cy5uU11W7bE wMN7Q3TyTrz12CcWmfvglwjMFYQoZVJDts24M12NbMi4fk+Ty5c8tXb+fSkAbZjR89Qx u20A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:cc:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:dkim-signature :dkim-signature; bh=dMrMsby6Cn+S1oyegtqFlihj6mY0zY9GCEPa730KHxY=; b=cicqXkUBfWSVBABP32qeBryZ/yHvwFn6f0/ctN4gTjZ+DLiK2ePRxP6+EeUXMVd9ge 2WTqVeQSZmim6m88plMeDFrlsoXQxB9XfkHlAfq90NmroQoQp90TXCcFq3l2ZQ/bozfh jV6FNc87L692pdlCMrwKnUuaTCTukD/qPGsYjIfCIfFOAg5FVP9S8roxCu/KMc59wcaS 0ZinXqU5jbap+3pLsDrFsQdowU+8SwpkGzmZ3NJDwtre1w7ZYuZblWnvKVbvzkA507Gn qKRoyQ8ikOoTBVOkgJ5sdy3gE/bf+SHmaMpFbI1zhypnJpMJOQHGtflM5FUNLV2F0biL jNaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=ippBmb5L; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=fdj2KLse; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=pyOMex3r; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id f22-20020a056a0022d600b0057509d0411esi2255713pfj.192.2023.02.16.08.02.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Feb 2023 08:02:30 -0800 (PST) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=ippBmb5L; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=fdj2KLse; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=pyOMex3r; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1pSghp-0004Ia-Nn; Thu, 16 Feb 2023 16:01:57 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pSghn-0004IS-N5 for openvpn-devel@lists.sourceforge.net; Thu, 16 Feb 2023 16:01:55 +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: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:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=VO+pDeCKIKDTTfxVW7xiJEZZUDdHGyQvSLkmyZAe/h8=; b=ippBmb5LcXk0SmBlLhB4bk3Ldl i1eKGn655zQ9K7UsAiZMaRCjEhLScf8NcGuipbVSXqNxqQK89CDD8wSgDlw1XJ1BKfoX8UA4E+pMu R+Fe0llHfGtd459pm88HEzska1GVY2z1lXcaOk9NpPPxZ+OeOW1EyTdJOJ0wbRydg8Ac=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version: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:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=VO+pDeCKIKDTTfxVW7xiJEZZUDdHGyQvSLkmyZAe/h8=; b=f dj2KLseZg8VON8EEnLrkM8KU+/VSOR5h+9tdqFkTkhmSGs1fI7hsTEPdRFcomrBSJvdqK2v937eaP yxyrJzzO3MAJBpWmC7b7OqEbGVroMrqm5DJFVgI8+ffVcBLcLXq3oaF7gL01SKOqthM76DEr6darq XUxPP4pbZ67vnIGw=; Received: from mail-io1-f43.google.com ([209.85.166.43]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1pSghi-0004rt-1x for openvpn-devel@lists.sourceforge.net; Thu, 16 Feb 2023 16:01:54 +0000 Received: by mail-io1-f43.google.com with SMTP id w24so802242iow.13 for ; Thu, 16 Feb 2023 08:01:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=VO+pDeCKIKDTTfxVW7xiJEZZUDdHGyQvSLkmyZAe/h8=; b=pyOMex3rAmo2e5MJ0mZaIPfVVdckOmGIBVXKyGYcBqi+WrMG1ZmFGwAEqNffxSDTcL ufY7tGTyAbPMeq9A8wzW1UvMHVGlIBkV5OSYZCMYu07nrok33ohFfwDPB/9n9K/92R9n pGOHEzKpTGOAYiZ17c2yq+pUAvXWzXB3+kzMbrKaawAwAATZgzUDcttkY64huGEwAhLt HcRgcgDuZtzQPKXxliv/Cyzgif1x/CJoy8L8SIyIr+xKEkZ7wto4wszUuy7myAVgCJmC uObiuEtnXfXoFN5+QQGxDaCxVxov/IftN4YB1jXJUhFfOUlti2VMVZyUXZ0v9Vnkz82Y eBDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VO+pDeCKIKDTTfxVW7xiJEZZUDdHGyQvSLkmyZAe/h8=; b=p/BoeOWSEx9WsW05P39lx42EwLwDK2M1DyIWAb1xh8h2Ld15/fmogmqmAQ86rCE3I8 EoqNUZa0+MkVzMmZkMxdJC9e14A9xOuamydi3LJuaXVPNAgIpHr0HeDD1Y4nJvQ3r2HS bYNgS7kRny9w7gQDDYeHYuQxDW20gCaLsI2SCh6yPmH0y/Tz3G6mOEObyYzLpwqP8dcB 6JOhnWwi+FutgL5UlxWQzCZVoeEf88o/Q/sYRvD4RyO+HcS6ttDnoNejlB7oYcM1Arim JzshJZHEaoUNnEPxSuzICF0RumaAoLJ7K5ZCHOd/1kWsGXYIDWhZddQl90sQWpuQMD5T D92A== X-Gm-Message-State: AO0yUKXNEIw9tbQ2PmrcJkKKFoOnlSU+GY6w0YAecV0NH9o5fnV9tfFt G0C9ZI407GQ95yEeKroyehL0vdwCajk= X-Received: by 2002:a5d:9cc9:0:b0:707:85b3:5dbb with SMTP id w9-20020a5d9cc9000000b0070785b35dbbmr4961223iow.6.1676563305089; Thu, 16 Feb 2023 08:01:45 -0800 (PST) Received: from localhost.localdomain ([2a00:1d50:3:0:c5d6:eb14:4079:683d]) by smtp.gmail.com with ESMTPSA id v8-20020a6b5b08000000b007457f5ab197sm96400ioh.38.2023.02.16.08.01.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Feb 2023 08:01:44 -0800 (PST) From: Lev Stipakov To: openvpn-devel@lists.sourceforge.net Date: Thu, 16 Feb 2023 18:01:29 +0200 Message-Id: <20230216160129.994-1-lstipakov@gmail.com> X-Mailer: git-send-email 2.23.0.windows.1 MIME-Version: 1.0 X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-2.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Lev Stipakov Signed-off-by: Lev Stipakov --- src/openvpn/tun.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 20f80798..a1414d23 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -3705, 6 +3705, 7 @@ get_device_instance_id_interface(struct gc_aren [...] Content analysis details: (-0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.166.43 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [lstipakov[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.166.43 listed in wl.mailspike.net] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-Headers-End: 1pSghi-0004rt-1x Subject: [Openvpn-devel] [PATCH] Add logging for windows driver selection process 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: , Cc: Lev Stipakov Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1758004092374073408?= X-GMAIL-MSGID: =?utf-8?q?1758004092374073408?= From: Lev Stipakov Signed-off-by: Lev Stipakov Acked-by: Gert Doering --- src/openvpn/tun.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 20f80798..a1414d23 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -3705,6 +3705,7 @@ get_device_instance_id_interface(struct gc_arena *gc) msg(M_FATAL, "Error [%u] opening device information set key: %s", (unsigned int)err, strerror_win32(err, gc)); } + msg(D_TAP_WIN_DEBUG, "Enumerate device interface lists:"); for (DWORD i = 0;; ++i) { SP_DEVINFO_DATA device_info_data; @@ -3790,6 +3791,10 @@ get_device_instance_id_interface(struct gc_arena *gc) dev_iif->net_cfg_instance_id = (unsigned char *)string_alloc((char *)net_cfg_instance_id, gc); dev_iif->device_interface = string_alloc(dev_if, gc); + msg(D_TAP_WIN_DEBUG, "NetCfgInstanceId: %s, Device Interface: %s", + dev_iif->net_cfg_instance_id, + dev_iif->device_interface); + /* link into return list */ if (!first) { @@ -3835,6 +3840,7 @@ get_tap_reg(struct gc_arena *gc) msg(M_FATAL, "Error opening registry key: %s", ADAPTER_KEY); } + msg(D_TAP_WIN_DEBUG, "Enumerate drivers in registy: "); while (true) { char enum_name[256]; @@ -3942,6 +3948,9 @@ get_tap_reg(struct gc_arena *gc) last->next = reg; } last = reg; + + msg(D_TAP_WIN_DEBUG, "NetCfgInstanceId: %s, Driver: %s", + reg->guid, print_windows_driver(reg->windows_driver)); } } } @@ -6520,6 +6529,8 @@ tun_try_open_device(struct tuntap *tt, const char *device_guid, const struct dev path = tuntap_device_path; } + msg(D_TAP_WIN_DEBUG, "Using device interface: %s", path); + tt->hand = CreateFile(path, GENERIC_READ | GENERIC_WRITE, 0, /* was: FILE_SHARE_READ */ @@ -6529,7 +6540,7 @@ tun_try_open_device(struct tuntap *tt, const char *device_guid, const struct dev 0); if (tt->hand == INVALID_HANDLE_VALUE) { - msg(D_TUNTAP_INFO, "CreateFile failed on %s device: %s", print_windows_driver(tt->windows_driver), path); + msg(D_TUNTAP_INFO | M_ERRNO, "CreateFile failed on %s device: %s", print_windows_driver(tt->windows_driver), path); return false; }