From patchwork Sun Mar 21 03:46:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kristof Provost via Openvpn-devel X-Patchwork-Id: 1643 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director9.mail.ord1d.rsapps.net ([172.28.255.1]) by backend30.mail.ord1d.rsapps.net with LMTP id iJJAGIpgV2CxDwAAIUCqbw (envelope-from ) for ; Sun, 21 Mar 2021 11:04:42 -0400 Received: from proxy6.mail.ord1c.rsapps.net ([172.28.255.1]) by director9.mail.ord1d.rsapps.net with LMTP id +JDcF4pgV2CgRwAAalYnBA (envelope-from ) for ; Sun, 21 Mar 2021 11:04:42 -0400 Received: from smtp18.gate.ord1c ([172.28.255.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy6.mail.ord1c.rsapps.net with LMTPS id OHl9F4pgV2CWSgAA9sKXow (envelope-from ) for ; Sun, 21 Mar 2021 11:04:42 -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: smtp18.gate.ord1c.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=pass header.d=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=pass (p=none; dis=none) header.from=lists.sourceforge.net X-Suspicious-Flag: NO X-Classification-ID: c359cf22-8a56-11eb-8038-bc305bf00c68-1-1 Received: from [216.105.38.7] ([216.105.38.7:60704] helo=lists.sourceforge.net) by smtp18.gate.ord1c.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 3B/E1-10283-98067506; Sun, 21 Mar 2021 11:04:42 -0400 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: Reply-To:From:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Subject:MIME-Version:References:In-Reply-To: Message-Id:Date:To:Sender:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=FDYbeSsroN2y+3shI64vi2NQ2W4wvTX79C+osOLs8Zc=; b=c6JuKwkk4+0KSs2xZ7qITs9hF vCAWHEQcMTW/Zs1KuU8IfFfUf90Uk3cmL1VRQhCeSC25sF7ZfX+xymTGh6edgKAihP6ym4BqHg1Tp 4Dg0xqoOyGFNXjlv85qeZUJr9iJtpHX7OrWMGjlwitfPTnWDTBhAwlYKTjtB+FjJS/Eg0=; Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1lNzcS-0003iQ-5Q; Sun, 21 Mar 2021 15:03:56 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNzcO-0003hj-Sr for openvpn-devel@lists.sourceforge.net; Sun, 21 Mar 2021 15:03:52 +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=FcdfLTlpkwX+bRZKS97+8Uv4axyIt+zZyd2/Y/YY+fA=; b=EYeifkvmHfsrVU28lfPan/n8y7 Vh9afIFZfsQpAP2QnafxWMT/+88BcK+0fq4FsJqq5Sk4ey2JDnmwjPRIChgweKDfKtvhON7Ri+gXA C7+eYZtEEwL6dJeimF6kiRLH+brWQLTZ5MQvMs8WPUImDxAcTaunkXj8vSSKWBafsgPE=; 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=FcdfLTlpkwX+bRZKS97+8Uv4axyIt+zZyd2/Y/YY+fA=; b=h8D5yG7nIi/Ga9uy0Ix/4JqnyC 7Ii8VM/zgJcVhr0if8/JE/8/2XhEqIop26r7uu8JNA09iYHM7iBjqrssZK3Hp7kki+JfIlfgG1Avl mmJt/lvWemxS0JgC4/QTH1o1EkUeO85X+q9Ybpy/PdEiRSrgDacHjLJAxhFdyZdyjv3I=; Received: from krn.amebis.si ([93.103.235.207]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1lNzcG-00AHq0-Mx for openvpn-devel@lists.sourceforge.net; Sun, 21 Mar 2021 15:03:52 +0000 Received: by krn.amebis.si (Postfix, from userid 982) id 608B718E878E; Sun, 21 Mar 2021 15:46:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rozman.si; s=default; t=1616338003; bh=FcdfLTlpkwX+bRZKS97+8Uv4axyIt+zZyd2/Y/YY+fA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eRxecGDhOh0IMEKux/ehLmV8J2dvegGx8NoadbLbYquJgR8pem5ZJw+9PFO3YpFHs Gq1QrRuPBT8XIQH1FrBvO46PiwyUdf56Q5yI0qgaes1Lg5wJPEKetn4Ic67BLXwukf sb6br9kS22pheAIcWktY+P7MWoSCssQVEEmPk/tE= X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on krn.amebis.doma X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Received: from SR6.amebis.doma (unknown [IPv6:2a01:260:4101:1464:8095:bdbd:413f:700f]) by krn.amebis.si (Postfix) with ESMTP id EA1FE18E878A; Sun, 21 Mar 2021 15:46:40 +0100 (CET) To: openvpn-devel@lists.sourceforge.net Date: Sun, 21 Mar 2021 15:46:24 +0100 Message-Id: <20210321144627.1621-2-simon@rozman.si> X-Mailer: git-send-email 2.30.0.windows.2 In-Reply-To: <20210321144627.1621-1-simon@rozman.si> References: <20210321144627.1621-1-simon@rozman.si> MIME-Version: 1.0 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: rozman.si] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an 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: 1lNzcG-00AHq0-Mx Subject: [Openvpn-devel] [PATCH 2/5] tun.c: Remove dead code 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: , X-Patchwork-Original-From: Simon Rozman via Openvpn-devel From: Kristof Provost via Openvpn-devel Reply-To: Simon Rozman Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox Signed-off-by: Simon Rozman Acked-By: Arne Schwabe --- src/openvpn/tun.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 6c51a52d..6b7c8ef1 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -85,8 +85,6 @@ static void netsh_command(const struct argv *a, int n, int msglevel); static const char *netsh_get_id(const char *dev_node, struct gc_arena *gc); -static DWORD get_adapter_index_flexible(const char *name); - static bool do_address_service(const bool add, const short family, const struct tuntap *tt) { @@ -4877,38 +4875,6 @@ get_adapter_index(const char *guid) return index; } -static DWORD -get_adapter_index_flexible(const char *name) /* actual name or GUID */ -{ - struct gc_arena gc = gc_new(); - DWORD index; - index = get_adapter_index_method_1(name); - if (index == TUN_ADAPTER_INDEX_INVALID) - { - index = get_adapter_index_method_2(name); - } - if (index == TUN_ADAPTER_INDEX_INVALID) - { - const struct tap_reg *tap_reg = get_tap_reg(&gc); - const struct panel_reg *panel_reg = get_panel_reg(&gc); - const struct tap_reg *tr = get_adapter_by_name(name, tap_reg, panel_reg); - if (tr) - { - index = get_adapter_index_method_1(tr->guid); - if (index == TUN_ADAPTER_INDEX_INVALID) - { - index = get_adapter_index_method_2(tr->guid); - } - } - } - if (index == TUN_ADAPTER_INDEX_INVALID) - { - msg(M_INFO, "NOTE: could not get adapter index for name/GUID '%s'", name); - } - gc_free(&gc); - return index; -} - /* * Return a string representing a PIP_ADDR_STRING */