From patchwork Wed Feb 5 01:46:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Domagoj Pensa X-Patchwork-Id: 974 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director11.mail.ord1d.rsapps.net ([172.28.255.1]) by backend30.mail.ord1d.rsapps.net with LMTP id EIUqJ/m8Ol7tMAAAIUCqbw for ; Wed, 05 Feb 2020 08:02:49 -0500 Received: from proxy3.mail.ord1c.rsapps.net ([172.28.255.1]) by director11.mail.ord1d.rsapps.net with LMTP id kN38Jvm8Ol6+AwAAvGGmqA ; Wed, 05 Feb 2020 08:02:49 -0500 Received: from smtp2.gate.ord1c ([172.28.255.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy3.mail.ord1c.rsapps.net with LMTP id IE0rJvm8Ol4QHQAANIxBXg ; Wed, 05 Feb 2020 08:02:49 -0500 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: smtp2.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=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dmarc=none (p=nil; dis=none) header.from=pensa.hr X-Suspicious-Flag: YES X-Classification-ID: ce835922-4817-11ea-8356-842b2b4e7063-1-1 Received: from [216.105.38.7] ([216.105.38.7:52966] helo=lists.sourceforge.net) by smtp2.gate.ord1c.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id D0/30-19364-7FCBA3E5; Wed, 05 Feb 2020 08:02:48 -0500 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.90_1) (envelope-from ) id 1izKJS-0005ee-S8; Wed, 05 Feb 2020 13:01:50 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1izKJQ-0005eU-KF for openvpn-devel@lists.sourceforge.net; Wed, 05 Feb 2020 13:01:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Content-Transfer-Encoding:MIME-Version :Date:Subject:Message-ID:To:From:Sender:Reply-To:Cc: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=T0Jmyo7e8oNvKQ5oX+AIyno0o9qGUgdmneFzuX87WWc=; b=WYK8rqpKItbjCw34xXGsIhwXGq UGxhfIV4LiONM8T3I/kmdYJEQFrPGHSyTktO7WKwIwdvHUHfb9vnRz2kcJZ69J0zydYjpWaIx0gjr nxVhN65euyzXWZTgPtj6HaGgWH8YQjQk8HD/asy+VRSRnL0RsvvudH1XSB53Zfe/gnUY=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Date:Subject: Message-ID:To:From:Sender:Reply-To:Cc: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=T0Jmyo7e8oNvKQ5oX+AIyno0o9qGUgdmneFzuX87WWc=; b=DTefZth+YvSyWNh7sAu1W8cKXz 51p71M0Qx+iVO71OrY+k23XquAaX/wElJCNZ2bFgdWkiCo8IncE5Wls11rIjCC+lTFopvrevKTNqq dk9GgvQSzqIFgLx6Zac58VRt9VXIwpqf7bgAO+sSOGQzXeQDMktNHPBjks3/ZspcmTcA=; Received: from sender4-of-o51.zoho.com ([136.143.188.51]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) (Exim 4.92.2) id 1izKJP-00AybC-49 for openvpn-devel@lists.sourceforge.net; Wed, 05 Feb 2020 13:01:48 +0000 Received: from localhost (31-38.dsl.iskon.hr [89.164.31.38]) by mx.zohomail.com with SMTPS id 1580906778373332.7557357528042; Wed, 5 Feb 2020 04:46:18 -0800 (PST) From: Domagoj Pensa To: openvpn-devel@lists.sourceforge.net Message-ID: <20200205124615.15758-1-domagoj@pensa.hr> Date: Wed, 5 Feb 2020 13:46:13 +0100 X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 X-ZohoMailClient: External 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.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Headers-End: 1izKJP-00AybC-49 Subject: [Openvpn-devel] [PATCH 0/2] Couple of fixes 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 Hi! First patch fixes long delays when setting IPv4 DNS using netsh without interactive service by adding "validate=no" to netsh invocation. I've noticed that issue while testing wintun, as it is setup using netsh. All other variants, IPv6 DNS without interactive service and IPv4/IPv6 DNS with interactive service, have validation already turned off. Change is adapted from code by commit 786e06a. It is necessary to make sure that argument is added only for DNS and not WINS, thus additional check is made (is_dns). Second patch was necessary, at least for me, because build process was unable to perform linking, with the following output: /usr/bin/x86_64-w64-mingw32-ld: forward.o:forward.c:(.text+0x5fec): undefined reference to `tuntap_is_wintun' /usr/bin/x86_64-w64-mingw32-ld: mtcp.o:mtcp.c:(.text+0x8a4): undefined reference to `tuntap_is_wintun' /usr/bin/x86_64-w64-mingw32-ld: mtcp.o:mtcp.c:(.text+0x1362): undefined reference to `tuntap_is_wintun' /usr/bin/x86_64-w64-mingw32-ld: mtcp.o:mtcp.c:(.text+0x1379): undefined reference to `tuntap_ring_empty' /usr/bin/x86_64-w64-mingw32-ld: mudp.o:mudp.c:(.text+0x536): undefined reference to `tuntap_is_wintun' /usr/bin/x86_64-w64-mingw32-ld: mudp.o:mudp.c:(.text+0xf53): undefined reference to `tuntap_ring_empty' /usr/bin/x86_64-w64-mingw32-ld: openvpn.o:openvpn.c:(.text+0x1b6): undefined reference to `tuntap_ring_empty' /usr/bin/x86_64-w64-mingw32-ld: openvpn.o:openvpn.c:(.text+0x261): undefined reference to `tuntap_is_wintun' collect2: error: ld returned 1 exit status After declaring both functions as static linking worked. I'm using Ubuntu 19.04 with mingw-w64 from official repository (version 6.0.0-3) and for build process script generic/build from openvpn-build repository. It is also worth noting that similar function tuntap_defined() with same signature (static inline bool) already exists in the same header file, so this change should be safe. Domagoj Pensa (2): Skip DNS address validation Fix linking issues on MinGW src/openvpn/tun.c | 9 +++++++++ src/openvpn/tun.h | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-)