From patchwork Mon Nov 30 22:16:21 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 5828 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:6022:91c9:10b0:11b:d6c:f273 with SMTP id tl9-n1csp13756167lad; Mon, 30 Nov 2026 14:16:40 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErFeWqpy8eSgrLXfq65PJHvD38nACZ2M9qkGKbrfmFqu0ApKaUN+hcNbcF8Hrc1o8AI6ReR94BImOvM=@openvpn.net X-Received: by 2002:a05:7300:e003:b0:386:a75c:4a78 with SMTP id 5a478bee46e88-386a75c4cb3mr26585320eec.15.1796076999734; Mon, 30 Nov 2026 14:16:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1796076999; cv=none; d=google.com; s=arc-20260327; b=Zt0nRQ/e60E5mDAjGgE2fLP1S2s6uH6axtJBu4P4GEBaPBD6bz4rteMQGK5nDpu8aq UKvbfkMr6c0P9ck/sbK3SEAvVLhRuY5RfUkflLEnwFW7cDkg7HbeYOTqg9PBgSa8uOBv uXygIsSv3XVouXOEun2/W/Zbp3BNjTOxCn5Bv2r/+hmTUit2StsYMu3t3qtpe3E79Xeg O1o3eb0OSGgn0nDA+5Dy+jyRwcG8+cHOJfO8DUIyUldmBBbKD4kTbajKAlg+JUM1hrr8 e5wH6rAKenLzTAl+dWO7+gAea3FrNm0p2KDCE9tX6JyXxjltKeL+hyGjzue0VQitIrFA yqnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature; bh=evS7w0g5fbTGvdwgzZ8angnhMfIux0s6FZaSyGr1VsQ=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=EBA4aphQrFL5jXZ7SmSG6JSGlHUE/92b35aAD4EnzljuK4mgj9Byw9vupOI75Drvjc ALbPORTUCX8ChA3njXY3L+xIrt7cFlJASWu5FH1RmzCLCjBevJ3U3K34cHeZ0IttgkxD GIUr8Be+ACc5syEHAoCmIUiodd+622unGyOUJ/Utyl3XEukI9olQ/vwNxAlF2Ss3fZ8u RsTxmYh/MsiFYwxJcPMEAbTH83Dp4/sPlcyI7Kcd8TZLx8W5YNCt7lzWNlZRExS92TZV iD3adikWefQS4FBZ9vhJq8apkCunu5kTf0RLMjx4/Op5pBJn+xo8e29j9HXWHqhVEE43 yB2Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=ljOiCsNv; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=l2B0kRDh; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=OUAElRW0; 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=NONE dis=NONE) header.from=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 5a478bee46e88-38567fa176fsi86865094eec.52.2026.11.30.14.16.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Nov 2026 14:16:39 -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=pass header.i=@lists.sourceforge.net header.s=beta header.b=ljOiCsNv; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=l2B0kRDh; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=OUAElRW0; 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=NONE dis=NONE) header.from=muc.de DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:MIME-Version:References:In-Reply-To:Message-ID:Date:To:From:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=evS7w0g5fbTGvdwgzZ8angnhMfIux0s6FZaSyGr1VsQ=; b=ljOiCsNvESiMFi bYI+IF8yZs4rpzTlj88ToSYKdR4YauREYS3BMmwOYEWfyFNRdVLYuo90vLJv1kfvCe4lmvWOBvG5L 6s2JIHztMCRgZT8WrkfjgicOBkLLmxOtP2VgDr0BR3nkzSrwOG3Wu0alhn1GgV0lqwk5Ka9O1kNWZ XrM=; Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.100.1) (envelope-from ) id 1xY9fq-0000000013L-3V94; Mon, 30 Nov 2026 22:16:38 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.100.1) (envelope-from ) id 1xY9fp-0000000013E-3PPy for openvpn-devel@lists.sourceforge.net; Mon, 30 Nov 2026 22:16:37 +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:To:From:Sender:Reply-To:Cc: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-Unsubscribe-Post:List-Subscribe:List-Post:List-Owner:List-Archive; bh=dr1KiuBLQv2Qff+ETI3SD/Uzhwm+ah8kaYbvt2KJKuc=; b=l2B0kRDheGho4T3ujpcvLH8gDY IAjIxkxT8JUTpk+8ubenDV3AIMmiihrPuCFEWjnLMNWJKc0xWEWngNjjyzEUcsjnIlFuYQts/kQc6 6Ojmt+dg5oXDNUxZFV3w2EOHs/qHfra5gvehPbiPR6xDf+uvUXJOqrshkAsJc3B7z8X0=; 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:To:From:Sender:Reply-To:Cc: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-Unsubscribe-Post: List-Subscribe:List-Post:List-Owner:List-Archive; bh=dr1KiuBLQv2Qff+ETI3SD/Uzhwm+ah8kaYbvt2KJKuc=; b=OUAElRW0iK0UCUPKo5PYpB1uSH X5Wrvrluuu3X93TuyNyr4PTxGdX16syqhqlEdm2dvXvuLyaHhz30fkrqJ4YsTdapPIZ9w36amR1Uh KY6ansmzjXS+v8ZjNIgiXgSlvH+n5zcRlKqTwuQVvmBugqKTrU+06Aedhy/rYIMhzlU4=; Received: from [193.149.48.129] (helo=blue.greenie.muc.de) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.100.1) id 1xY9fm-000000001TD-40SH for openvpn-devel@lists.sourceforge.net; Mon, 30 Nov 2026 22:16:37 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.18.1/8.18.1) with ESMTP id 6AUMGSnh027144 for ; Mon, 30 Nov 2026 23:16:28 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 6AUMGS8k027143 for openvpn-devel@lists.sourceforge.net; Mon, 30 Nov 2026 23:16:28 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Mon, 30 Nov 2026 23:16:21 +0100 Message-ID: <20261130221627.27132-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.55.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "sfi-spamd-2.hosts.colo.sdot.me", 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: Razvan Cojocaru tap_create_adapter() open-coded delete_device() on its cleanup path. Change-Id: I7e85442c6d7309b90e18a0ced7ae709b26c6dfc7 Signed-off-by: Razvan Cojocaru Acked-by: Frank Lichtenheld Gerrit URL: https://gerrit.openvpn.net/c/o [...] Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1xY9fm-000000001TD-40SH Subject: [Openvpn-devel] [PATCH v1] tapctl: use delete_device() to remove a half-created adapter 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 X-GMAIL-THRID: 1883323236334703763 X-GMAIL-MSGID: 1883323236334703763 From: Razvan Cojocaru tap_create_adapter() open-coded delete_device() on its cleanup path. Change-Id: I7e85442c6d7309b90e18a0ced7ae709b26c6dfc7 Signed-off-by: Razvan Cojocaru Acked-by: Frank Lichtenheld Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2370 --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2370 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Frank Lichtenheld diff --git a/src/tapctl/tap.c b/src/tapctl/tap.c index a3d83e9..ffe7869 100644 --- a/src/tapctl/tap.c +++ b/src/tapctl/tap.c @@ -769,36 +769,7 @@ if (dwResult != ERROR_SUCCESS) { /* The adapter was installed. But, the adapter ID was unobtainable. Clean-up. */ - SP_REMOVEDEVICE_PARAMS removedevice_params = { - .ClassInstallHeader = { - .cbSize = sizeof(SP_CLASSINSTALL_HEADER), - .InstallFunction = DIF_REMOVE, - }, - .Scope = DI_REMOVEDEVICE_GLOBAL, - .HwProfile = 0, - }; - - /* Set class installer parameters for DIF_REMOVE. */ - if (SetupDiSetClassInstallParams(hDevInfoList, &devinfo_data, - &removedevice_params.ClassInstallHeader, - sizeof(SP_REMOVEDEVICE_PARAMS))) - { - /* Call appropriate class installer. */ - if (SetupDiCallClassInstaller(DIF_REMOVE, hDevInfoList, &devinfo_data)) - { - /* Check if a system reboot is required. */ - check_reboot(hDevInfoList, &devinfo_data, pbRebootRequired); - } - else - { - msg(M_NONFATAL | M_ERRNO, "%s: SetupDiCallClassInstaller(DIF_REMOVE) failed", - __FUNCTION__); - } - } - else - { - msg(M_NONFATAL | M_ERRNO, "%s: SetupDiSetClassInstallParams failed", __FUNCTION__); - } + delete_device(hDevInfoList, &devinfo_data, pbRebootRequired); } cleanup_hDevInfoList: