From patchwork Wed Apr 21 03:43:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 1755 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director10.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id kE58J2MsgGD1NgAAIUCqbw (envelope-from ) for ; Wed, 21 Apr 2021 09:45:07 -0400 Received: from proxy1.mail.ord1d.rsapps.net ([172.30.191.6]) by director10.mail.ord1d.rsapps.net with LMTP id sEEjJ2MsgGA5VAAApN4f7A (envelope-from ) for ; Wed, 21 Apr 2021 09:45:07 -0400 Received: from smtp11.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy1.mail.ord1d.rsapps.net with LMTPS id kMZuJmMsgGAEWAAAasrz9Q (envelope-from ) for ; Wed, 21 Apr 2021 09:45:07 -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: smtp11.gate.ord1d.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=rfc2549.org X-Suspicious-Flag: YES X-Classification-ID: c7f2eeba-a2a7-11eb-9b40-5254005f837b-1-1 Received: from [216.105.38.7] ([216.105.38.7:49092] helo=lists.sourceforge.net) by smtp11.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 6E/6E-07601-26C20806; Wed, 21 Apr 2021 09:45:06 -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 1lZD9Z-0005wc-J5; Wed, 21 Apr 2021 13:44:29 +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 1lZD9C-0005q3-8U for openvpn-devel@lists.sourceforge.net; Wed, 21 Apr 2021 13:44:06 +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: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:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=GcI2kVyD2OHEAW2uwUSz2wJGbylSBFgYfGD39Qhy0tk=; b=Ga7EkfX7Nzm3/HxyJsO9/ztMeC Di506a/gTVho4YDWc4ga5SveplKcY2TPef/GN4qQDjx0VNqZ3FFdJ/9t8Vg1XZMd/G9T8TM6K+BFo cmUPcCfgVa7JgHHi/v7i9hJI1PUm7Vynnvci+sog6odABIiT+6eUjIb1k5oqNmKb1mgo=; 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: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:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=GcI2kVyD2OHEAW2uwUSz2wJGbylSBFgYfGD39Qhy0tk=; b=P EzwARFD6HvThEoTmw8e4eIfhNi5GaEfdthDXX8PqjiPU70jYpp5W3DwxEnFvYZR72ZCWEwk1zvS1a +vssA6+rfN1cUWRBNJsnU8qvP0DYWtCOyb1KeOJ/pz+RH2EO4C/XzO/AEcssm7zUiiUK0tOde23Tf fo3xPw8syg51LOBI=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) id 1lZD90-0004ZH-Mr for openvpn-devel@lists.sourceforge.net; Wed, 21 Apr 2021 13:44:06 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.94 (FreeBSD)) (envelope-from ) id 1lZD8t-0004QI-SZ for openvpn-devel@lists.sourceforge.net; Wed, 21 Apr 2021 15:43:47 +0200 Received: (nullmailer pid 1950438 invoked by uid 10006); Wed, 21 Apr 2021 13:43:48 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Wed, 21 Apr 2021 15:43:42 +0200 Message-Id: <20210421134348.1950392-1-arne@rfc2549.org> X-Mailer: git-send-email 2.25.1 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: configure.ac] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Headers-End: 1lZD90-0004ZH-Mr Subject: [Openvpn-devel] [PATCH 1/7] Remove --disable-multihome option 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 With this change we always build multihome support if the operating system supports it. Signed-off-by: Arne Schwabe --- configure.ac | 7 ------- src/openvpn/syshead.h | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 747325164..aaac65c3d 100644 --- a/configure.ac +++ b/configure.ac @@ -121,13 +121,6 @@ AC_ARG_ENABLE( [enable_fragment="yes"] ) -AC_ARG_ENABLE( - [multihome], - [AS_HELP_STRING([--disable-multihome], [disable multi-homed UDP server support (--multihome) @<:@default=yes@:>@])], - , - [enable_multihome="yes"] -) - AC_ARG_ENABLE( [port-share], [AS_HELP_STRING([--disable-port-share], [disable TCP server port-share support (--port-share) @<:@default=yes@:>@])], diff --git a/src/openvpn/syshead.h b/src/openvpn/syshead.h index bac07d102..0b029c648 100644 --- a/src/openvpn/syshead.h +++ b/src/openvpn/syshead.h @@ -391,7 +391,7 @@ typedef int MIB_TCP_STATE; * Does this platform support linux-style IP_PKTINFO * or bsd-style IP_RECVDSTADDR ? */ -#if defined(ENABLE_MULTIHOME) && ((defined(HAVE_IN_PKTINFO) && defined(IP_PKTINFO)) || defined(IP_RECVDSTADDR)) && defined(HAVE_MSGHDR) && defined(HAVE_CMSGHDR) && defined(HAVE_IOVEC) && defined(CMSG_FIRSTHDR) && defined(CMSG_NXTHDR) && defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) +#if ((defined(HAVE_IN_PKTINFO) && defined(IP_PKTINFO)) || defined(IP_RECVDSTADDR)) && defined(HAVE_MSGHDR) && defined(HAVE_CMSGHDR) && defined(HAVE_IOVEC) && defined(CMSG_FIRSTHDR) && defined(CMSG_NXTHDR) && defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG) #define ENABLE_IP_PKTINFO 1 #else #define ENABLE_IP_PKTINFO 0 From patchwork Wed Apr 21 03:43:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 1751 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director11.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id 4Fp0I1UsgGAsawAAIUCqbw (envelope-from ) for ; Wed, 21 Apr 2021 09:44:53 -0400 Received: from proxy4.mail.ord1d.rsapps.net ([172.30.191.6]) by director11.mail.ord1d.rsapps.net with LMTP id SChJI1UsgGCzVQAAvGGmqA (envelope-from ) for ; Wed, 21 Apr 2021 09:44:53 -0400 Received: from smtp2.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy4.mail.ord1d.rsapps.net with LMTPS id 8DXaIlUsgGDRaAAAiYrejw (envelope-from ) for ; Wed, 21 Apr 2021 09:44:53 -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: smtp2.gate.ord1d.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=rfc2549.org X-Suspicious-Flag: YES X-Classification-ID: bf8e4238-a2a7-11eb-b446-5254004a0287-1-1 Received: from [216.105.38.7] ([216.105.38.7:48178] helo=lists.sourceforge.net) by smtp2.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id DF/09-14622-45C20806; Wed, 21 Apr 2021 09:44:52 -0400 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 1lZD9D-0007Un-HQ; Wed, 21 Apr 2021 13:44:07 +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 1lZD9B-0007UT-IQ for openvpn-devel@lists.sourceforge.net; Wed, 21 Apr 2021 13:44:06 +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-Subscribe:List-Post:List-Owner:List-Archive; bh=d30VE6uuF+Hd7Huzg81z/lKas4cpBlMzDGg1lrrdfnE=; b=nVIzZR9dthkI/gdBRkiUZxaIl7 xibHiM5tPjXxGHZ0tTzAIUVBJuM5/Qm4+nJT3vvUgN7/O6jRRij8TbOvJet+mvjO3PVwrIYCFMmOH nO6DGag5HauCCjUqUdfw5Dsdy16mK3dcxTU5udjqcwBFli6p6Xyx8nnzPt/OOE7SNHW0=; 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-Subscribe: List-Post:List-Owner:List-Archive; bh=d30VE6uuF+Hd7Huzg81z/lKas4cpBlMzDGg1lrrdfnE=; b=RAYV65jvOL8q5bsIIJVy0ADrb9 6U+Dkxt2DAWq8c6dQN3C+k4Enu/xOlV7/7tEdHawl5apRKiWIFUU47mG8S/lgnxyi2BElU/nnI/37 yZK5P9mbERxZEgOODe3TK1AVlJK/+5sd1ohmx4/1hwKL3g8QRfYmo6K07vPXtiTsH+es=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1lZD95-0088oT-Cv for openvpn-devel@lists.sourceforge.net; Wed, 21 Apr 2021 13:44:06 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.94 (FreeBSD)) (envelope-from ) id 1lZD8t-0004QL-Vt for openvpn-devel@lists.sourceforge.net; Wed, 21 Apr 2021 15:43:47 +0200 Received: (nullmailer pid 1950445 invoked by uid 10006); Wed, 21 Apr 2021 13:43:48 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Wed, 21 Apr 2021 15:43:43 +0200 Message-Id: <20210421134348.1950392-2-arne@rfc2549.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210421134348.1950392-1-arne@rfc2549.org> References: <20210421134348.1950392-1-arne@rfc2549.org> 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: configure.ac] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Headers-End: 1lZD95-0088oT-Cv Subject: [Openvpn-devel] [PATCH 2/7] Move direct.h header where it is used 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 The direct.h header provides only a handful of functions [1] of which we only use _wchdir. Directly included the direct.h file where it is used and remove autoconf magic around it. [1] https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2012/as5kw0ze(v=vs.110)?redirectedfrom=MSDN Signed-off-by: Arne Schwabe --- configure.ac | 2 +- src/openvpn/platform.c | 4 ++++ src/openvpn/syshead.h | 4 ---- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index aaac65c3d..a67bf2595 100644 --- a/configure.ac +++ b/configure.ac @@ -407,7 +407,7 @@ AX_TYPE_SOCKLEN_T AC_CHECK_SIZEOF([unsigned int]) AC_CHECK_SIZEOF([unsigned long]) AC_CHECK_HEADERS([ \ - fcntl.h io.h direct.h \ + fcntl.h io.h \ sys/types.h sys/socket.h \ unistd.h dlfcn.h \ netinet/in.h netinet/in_systm.h \ diff --git a/src/openvpn/platform.c b/src/openvpn/platform.c index 45ee54541..c63c1d994 100644 --- a/src/openvpn/platform.c +++ b/src/openvpn/platform.c @@ -39,6 +39,10 @@ #include "platform.h" +#if _WIN32 +#include +#endif + /* Redefine the top level directory of the filesystem * to restrict access to files for security */ void diff --git a/src/openvpn/syshead.h b/src/openvpn/syshead.h index 0b029c648..cb9bf7dc7 100644 --- a/src/openvpn/syshead.h +++ b/src/openvpn/syshead.h @@ -100,10 +100,6 @@ #include #endif -#ifdef HAVE_DIRECT_H -#include -#endif - #ifdef HAVE_IO_H #include #endif From patchwork Wed Apr 21 03:43:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 1752 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director14.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id KNYTJVYsgGAsawAAIUCqbw (envelope-from ) for ; Wed, 21 Apr 2021 09:44:54 -0400 Received: from proxy18.mail.ord1d.rsapps.net ([172.30.191.6]) by director14.mail.ord1d.rsapps.net with LMTP id CJfSJFYsgGBaRQAAeJ7fFg (envelope-from ) for ; Wed, 21 Apr 2021 09:44:54 -0400 Received: from smtp30.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy18.mail.ord1d.rsapps.net with LMTPS id +ACmJFYsgGBqSwAATCaURg (envelope-from ) for ; Wed, 21 Apr 2021 09:44:54 -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: smtp30.gate.ord1d.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=rfc2549.org X-Suspicious-Flag: YES X-Classification-ID: c028eaa4-a2a7-11eb-850d-5254001e8e38-1-1 Received: from [216.105.38.7] ([216.105.38.7:48662] helo=lists.sourceforge.net) by smtp30.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id E1/27-06584-55C20806; Wed, 21 Apr 2021 09:44:53 -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 1lZD99-0005ow-2Z; Wed, 21 Apr 2021 13:44:03 +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 1lZD97-0005oL-Qd for openvpn-devel@lists.sourceforge.net; Wed, 21 Apr 2021 13:44:01 +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-Subscribe:List-Post:List-Owner:List-Archive; bh=eP5Bs9FTLUXF37sZOFMT9hMNVAIUt67CxYDcCgz8wJA=; b=Pg/pT4LmJhIogZnzU3ybbk/gAJ 7lKRZEZNSU+g8d3+R4OpTE1oErdLkyddmhAoZf6SQSLkf5Asll0VXrUFSl3vpuu/YP1qAAxwygqL5 +YSbeBmApTujjUic2SjKIZw0AJs+MZ6dNZSxa2J8p0Z4OsWEgLyl8YR10Cly6tGtjzco=; 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-Subscribe: List-Post:List-Owner:List-Archive; bh=eP5Bs9FTLUXF37sZOFMT9hMNVAIUt67CxYDcCgz8wJA=; b=hHD/NfgoPVCPDRqC9Lod4OLNbL BjhDPaRDJFOqizbK4zDk58NyHGBxEI5wc1/nTW0E+Jz7QJEIQMT+7V5VZdSRbiwwc5ebETQWoTRBs /AoxAUvhT1+tx1XBrrK1iqVH8TePsYJJ1jNqvVyEXr4KVrtofaf/5BWsh2Ufx9DeOMwY=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) id 1lZD90-0004ZI-MO for openvpn-devel@lists.sourceforge.net; Wed, 21 Apr 2021 13:44:01 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.94 (FreeBSD)) (envelope-from ) id 1lZD8u-0004QO-1m for openvpn-devel@lists.sourceforge.net; Wed, 21 Apr 2021 15:43:48 +0200 Received: (nullmailer pid 1950448 invoked by uid 10006); Wed, 21 Apr 2021 13:43:48 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Wed, 21 Apr 2021 15:43:44 +0200 Message-Id: <20210421134348.1950392-3-arne@rfc2549.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210421134348.1950392-1-arne@rfc2549.org> References: <20210421134348.1950392-1-arne@rfc2549.org> 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: rfc2549.org] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Headers-End: 1lZD90-0004ZI-MO Subject: [Openvpn-devel] [PATCH 3/7] Remove always enabled USE_64_BIT_COUNTERS define 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 Also change the types to use C99 uint64_t and its printf u64 define. Signed-off-by: Arne Schwabe Acked-by: Antonio Quartulli --- src/openvpn/common.h | 15 +++------------ src/openvpn/syshead.h | 5 ----- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/src/openvpn/common.h b/src/openvpn/common.h index 623b3e0d7..544fa238e 100644 --- a/src/openvpn/common.h +++ b/src/openvpn/common.h @@ -25,19 +25,10 @@ #define COMMON_H /* - * Statistics counters and associated printf formats. + * Statistics counters and associated printf format. */ -#ifdef USE_64_BIT_COUNTERS -typedef unsigned long long int counter_type; -#ifdef _WIN32 -#define counter_format "%I64u" -#else -#define counter_format "%llu" -#endif -#else /* ifdef USE_64_BIT_COUNTERS */ -typedef unsigned int counter_type; -#define counter_format "%u" -#endif +typedef uint64_t counter_type; +#define counter_format "%" PRIu64 /* * Time intervals diff --git a/src/openvpn/syshead.h b/src/openvpn/syshead.h index cb9bf7dc7..f29c63c73 100644 --- a/src/openvpn/syshead.h +++ b/src/openvpn/syshead.h @@ -458,11 +458,6 @@ socket_defined(const socket_descriptor_t sd) return sd != SOCKET_UNDEFINED; } -/* - * Should statistics counters be 64 bits? - */ -#define USE_64_BIT_COUNTERS - /* * Should we enable the use of execve() for calling subprocesses, * instead of system()? From patchwork Wed Apr 21 03:43:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 1757 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director14.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id 8KovHG4sgGCAHwAAIUCqbw (envelope-from ) for ; Wed, 21 Apr 2021 09:45:18 -0400 Received: from proxy17.mail.ord1d.rsapps.net ([172.30.191.6]) by director14.mail.ord1d.rsapps.net with LMTP id cJ/oG24sgGD0RgAAeJ7fFg (envelope-from ) for ; Wed, 21 Apr 2021 09:45:18 -0400 Received: from smtp23.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy17.mail.ord1d.rsapps.net with LMTPS id EDWpG24sgGBnUQAAWC7mWg (envelope-from ) for ; Wed, 21 Apr 2021 09:45:18 -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: smtp23.gate.ord1d.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=rfc2549.org X-Suspicious-Flag: YES X-Classification-ID: cea120d8-a2a7-11eb-a607-525400bfb165-1-1 Received: from [216.105.38.7] ([216.105.38.7:54366] helo=lists.sourceforge.net) by smtp23.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 2C/88-12012-D6C20806; Wed, 21 Apr 2021 09:45:18 -0400 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.92.3) (envelope-from ) id 1lZD9a-0002h4-RM; Wed, 21 Apr 2021 13:44:30 +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.92.3) (envelope-from ) id 1lZD9A-0002fE-Of for openvpn-devel@lists.sourceforge.net; Wed, 21 Apr 2021 13:44:04 +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-Subscribe:List-Post:List-Owner:List-Archive; bh=MzftlywwtqX4zBHkrx8uiyoomdRoLfhhG5SGZuRiT6Q=; b=dseJJ2Vaf1HWGEUA6TXbM07Tba 31KSW1FRNY0tkGzCAmQwTWcYlBRsXS160MOC84IU3ZHiunK0DLF6s9yKQplAfXq9RDCHJpQjliSCy bN27cG7+u4otNzMs7iEtisbXlIW8DkwVFk47BaS18J+pRcz85Kn9j6DqfMm4hqNoiNQM=; 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-Subscribe: List-Post:List-Owner:List-Archive; bh=MzftlywwtqX4zBHkrx8uiyoomdRoLfhhG5SGZuRiT6Q=; b=fqhYDnBOGexZoFsxYsxFmhsP2O QuIllkLcrkq4n/fn6USp1BzPhwonieciMUhoa2FdhP/2C0cG9bXIliLEqIFxjxGKls83BKo6hCoY3 kRfZ8mpvn6VRO2DLetD0TuExmRlVkjtzdov6zoL8FcHFmyxl66agR8e7bretapgB33k8=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1lZD95-0088oU-CF for openvpn-devel@lists.sourceforge.net; Wed, 21 Apr 2021 13:44:04 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.94 (FreeBSD)) (envelope-from ) id 1lZD8u-0004QR-3h for openvpn-devel@lists.sourceforge.net; Wed, 21 Apr 2021 15:43:48 +0200 Received: (nullmailer pid 1950451 invoked by uid 10006); Wed, 21 Apr 2021 13:43:48 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Wed, 21 Apr 2021 15:43:45 +0200 Message-Id: <20210421134348.1950392-4-arne@rfc2549.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210421134348.1950392-1-arne@rfc2549.org> References: <20210421134348.1950392-1-arne@rfc2549.org> 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: rfc2549.org] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Headers-End: 1lZD95-0088oU-CF Subject: [Openvpn-devel] [PATCH 4/7] Fix a number of mingw warnings 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 Move to definition inside the ifdef where they are used to avoid unused warnings. Fix a few printf related warnings when DWORD is used as paramter and the printf format should be %lu (long unsigned int) Signed-off-by: Arne Schwabe Acked-by: Antonio Quartulli --- src/openvpn/route.c | 4 ++-- src/openvpn/socket.c | 3 ++- src/openvpn/tun.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/openvpn/route.c b/src/openvpn/route.c index c6b3dc584..c83bd9e2b 100644 --- a/src/openvpn/route.c +++ b/src/openvpn/route.c @@ -2360,7 +2360,6 @@ delete_route_ipv6(const struct route_ipv6 *r6, const struct tuntap *tt, #else int metric; #endif - const char *device = tt->actual_name; bool gateway_needed = false; if ((r6->flags & (RT_DEFINED|RT_ADDED)) != (RT_DEFINED|RT_ADDED)) @@ -2369,6 +2368,7 @@ delete_route_ipv6(const struct route_ipv6 *r6, const struct tuntap *tt, } #ifndef _WIN32 + const char *device = tt->actual_name; if (r6->iface != NULL) /* vpn server special route */ { device = r6->iface; @@ -2713,7 +2713,7 @@ get_default_gateway_row(const MIB_IPFORWARDTABLE *routes) const DWORD index = row->dwForwardIfIndex; const DWORD metric = row->dwForwardMetric1; - dmsg(D_ROUTE_DEBUG, "GDGR: route[%d] %s/%s i=%d m=%d", + dmsg(D_ROUTE_DEBUG, "GDGR: route[%lu] %s/%s i=%d m=%d", i, print_in_addr_t((in_addr_t) net, 0, &gc), print_in_addr_t((in_addr_t) mask, 0, &gc), diff --git a/src/openvpn/socket.c b/src/openvpn/socket.c index b13d2e0f1..8a6e42cc6 100644 --- a/src/openvpn/socket.c +++ b/src/openvpn/socket.c @@ -2837,10 +2837,11 @@ print_link_socket_actual_ex(const struct link_socket_actual *act, { if (act) { - char ifname[IF_NAMESIZE] = "[undef]"; struct buffer out = alloc_buf_gc(128, gc); buf_printf(&out, "%s", print_sockaddr_ex(&act->dest.addr.sa, separator, flags, gc)); #if ENABLE_IP_PKTINFO + char ifname[IF_NAMESIZE] = "[undef]"; + if ((flags & PS_SHOW_PKTINFO) && addr_defined_ipi(act)) { switch (act->dest.addr.sa.sa_family) diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 2c1b270dd..4ef34e4eb 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -5606,7 +5606,7 @@ windows_set_mtu(const int iface_index, const short family, if (err != NO_ERROR) { - msg(M_WARN, "TUN: Setting %s mtu failed: %s [status=%u if_index=%d]", + msg(M_WARN, "TUN: Setting %s mtu failed: %s [status=%lu if_index=%d]", family_name, strerror_win32(err, &gc), err, iface_index); } else From patchwork Wed Apr 21 03:43:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 1756 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director12.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id CCU4LGwsgGAsawAAIUCqbw (envelope-from ) for ; Wed, 21 Apr 2021 09:45:16 -0400 Received: from proxy9.mail.ord1d.rsapps.net ([172.30.191.6]) by director12.mail.ord1d.rsapps.net with LMTP id CHzrK2wsgGCBNgAAIasKDg (envelope-from ) for ; Wed, 21 Apr 2021 09:45:16 -0400 Received: from smtp10.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy9.mail.ord1d.rsapps.net with LMTPS id MNKkK2wsgGCZawAA7h+8OQ (envelope-from ) for ; Wed, 21 Apr 2021 09:45:16 -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: smtp10.gate.ord1d.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=rfc2549.org X-Suspicious-Flag: YES X-Classification-ID: cd6773ca-a2a7-11eb-9764-52540013bccb-1-1 Received: from [216.105.38.7] ([216.105.38.7:54354] helo=lists.sourceforge.net) by smtp10.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 9C/88-30262-B6C20806; Wed, 21 Apr 2021 09:45:16 -0400 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.92.3) (envelope-from ) id 1lZD9b-0002hJ-F4; Wed, 21 Apr 2021 13:44:31 +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.92.3) (envelope-from ) id 1lZD9C-0002fd-6G for openvpn-devel@lists.sourceforge.net; Wed, 21 Apr 2021 13:44:06 +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-Subscribe:List-Post:List-Owner:List-Archive; bh=+/u8gIxE7SatXsl95p/wR0vHTBK2GzW1ChDGGkd5bJI=; b=crEWMS0IFLtLhehHx0R6SODXN6 0E3EeYS478AVD5rcJMMK0khIpNinPBUknv9JTOWYd2J8P1aAb4b/cooPlley8Y3HnyaJhfyWIm0aI DcelkgRRqJePiM2BcsTDujDIjMSNqj7pcNiN21hlaWH2r0Ws4YXi15K4eYPv8h+Y06eM=; 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-Subscribe: List-Post:List-Owner:List-Archive; bh=+/u8gIxE7SatXsl95p/wR0vHTBK2GzW1ChDGGkd5bJI=; b=MkufXAbOCpmqn+vFX/D6M59Lk7 KDD+UwQKqB9oz64qqq2KCZmn7yZjo8w0BJ8MVmXtFkXgVwaXU1jVOENbC3OKsS7a+hVtsndPMjxp0 JcoOfemLBHvP7AVxcHzTWcoQ4TFHR8R7MZmkxdlGZGMizrEF/o7v+eis48slK/DgqKHY=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) id 1lZD91-0004ZJ-P6 for openvpn-devel@lists.sourceforge.net; Wed, 21 Apr 2021 13:44:06 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.94 (FreeBSD)) (envelope-from ) id 1lZD8u-0004QU-6d for openvpn-devel@lists.sourceforge.net; Wed, 21 Apr 2021 15:43:48 +0200 Received: (nullmailer pid 1950454 invoked by uid 10006); Wed, 21 Apr 2021 13:43:48 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Wed, 21 Apr 2021 15:43:46 +0200 Message-Id: <20210421134348.1950392-5-arne@rfc2549.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210421134348.1950392-1-arne@rfc2549.org> References: <20210421134348.1950392-1-arne@rfc2549.org> 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: rfc2549.org] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Headers-End: 1lZD91-0004ZJ-P6 Subject: [Openvpn-devel] [PATCH 5/7] Remove support for blocking connect() 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 It is hard to imagine that we still have any supported OS that does not support non-blocking connect while still supporting non-blocking sockets in general. Signed-off-by: Arne Schwabe --- src/openvpn/socket.c | 8 -------- src/openvpn/syshead.h | 11 ----------- 2 files changed, 19 deletions(-) diff --git a/src/openvpn/socket.c b/src/openvpn/socket.c index 8a6e42cc6..4e13c65e8 100644 --- a/src/openvpn/socket.c +++ b/src/openvpn/socket.c @@ -1459,7 +1459,6 @@ openvpn_connect(socket_descriptor_t sd, protect_fd_nonlocal(sd, remote); #endif -#ifdef CONNECT_NONBLOCK set_nonblock(sd); status = connect(sd, remote, af_addr_size(remote->sa_family)); if (status) @@ -1540,13 +1539,6 @@ openvpn_connect(socket_descriptor_t sd, } } } -#else /* ifdef CONNECT_NONBLOCK */ - status = connect(sd, remote, af_addr_size(remote->sa_family)); - if (status) - { - status = openvpn_errno(); - } -#endif /* ifdef CONNECT_NONBLOCK */ return status; } diff --git a/src/openvpn/syshead.h b/src/openvpn/syshead.h index f29c63c73..a964ffd35 100644 --- a/src/openvpn/syshead.h +++ b/src/openvpn/syshead.h @@ -155,10 +155,6 @@ #include #endif -#ifdef HAVE_SYS_EPOLL_H -#include -#endif - #ifdef ENABLE_SELINUX #include #endif @@ -545,13 +541,6 @@ socket_defined(const socket_descriptor_t sd) #define EPOLL 0 #endif -/* - * Is non-blocking connect() supported? - */ -#if defined(SOL_SOCKET) && defined(SO_ERROR) && defined(EINPROGRESS) && defined(ETIMEDOUT) -#define CONNECT_NONBLOCK -#endif - /* * Compression support */ From patchwork Wed Apr 21 03:43:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 1754 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director11.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id wHbVAlosgGB7MQAAIUCqbw (envelope-from ) for ; Wed, 21 Apr 2021 09:44:58 -0400 Received: from proxy15.mail.ord1d.rsapps.net ([172.30.191.6]) by director11.mail.ord1d.rsapps.net with LMTP id 4FWpAlosgGAdVAAAvGGmqA (envelope-from ) for ; Wed, 21 Apr 2021 09:44:58 -0400 Received: from smtp34.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy15.mail.ord1d.rsapps.net with LMTPS id 2AhAAlosgGBeCAAAAY1PeQ (envelope-from ) for ; Wed, 21 Apr 2021 09:44:58 -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: smtp34.gate.ord1d.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=rfc2549.org X-Suspicious-Flag: YES X-Classification-ID: c2124982-a2a7-11eb-a911-5254008bd48f-1-1 Received: from [216.105.38.7] ([216.105.38.7:48778] helo=lists.sourceforge.net) by smtp34.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 6F/A3-25660-85C20806; Wed, 21 Apr 2021 09:44:57 -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 1lZD9F-0005qw-61; Wed, 21 Apr 2021 13:44:09 +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 1lZD9C-0005q2-8S for openvpn-devel@lists.sourceforge.net; Wed, 21 Apr 2021 13:44:06 +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-Subscribe:List-Post:List-Owner:List-Archive; bh=eUhBj5pQNLAmbi2i2hwPchQ5l17cMI2G+qwReeF9qCw=; b=GCkeXzwIJOpdtsiKQCxzetXy1p YemhitWyClf/yB6AMrEDC/KBuckhjMolBO3GIeKf/eaCurWxph6jlqxlUwoa13gEW8x50tLVU7xEh QkoCjbs5y8zXmZlfv0orXIzWrthlFMMcKhZOZg61Nk6Znx7gvUOnvtLngdAAQpNQCvD4=; 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-Subscribe: List-Post:List-Owner:List-Archive; bh=eUhBj5pQNLAmbi2i2hwPchQ5l17cMI2G+qwReeF9qCw=; b=VGIaf/ekb98QjkLptuGSsyO1B9 m1flpGK63y812i0M48ipjbzJdbzGAfK4CWR8bKd1bKGDBdiRsUYd1/XzzP+zIP/LGraHMjvqnd4JD autx9yf2uSCgCiUekzgDWjmTHUGLvczvfyWOiu/F6czvjLLkRQd10VfuMV5g5mwe5Wfs=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1lZD95-0088oW-CZ for openvpn-devel@lists.sourceforge.net; Wed, 21 Apr 2021 13:44:06 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.94 (FreeBSD)) (envelope-from ) id 1lZD8u-0004QX-8w for openvpn-devel@lists.sourceforge.net; Wed, 21 Apr 2021 15:43:48 +0200 Received: (nullmailer pid 1950457 invoked by uid 10006); Wed, 21 Apr 2021 13:43:48 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Wed, 21 Apr 2021 15:43:47 +0200 Message-Id: <20210421134348.1950392-6-arne@rfc2549.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210421134348.1950392-1-arne@rfc2549.org> References: <20210421134348.1950392-1-arne@rfc2549.org> 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: rfc2549.org] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Headers-End: 1lZD95-0088oW-CZ Subject: [Openvpn-devel] [PATCH 6/7] Replace OS_SPECIFIC_DIRSEP with PATH_SEPARATOR 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 We have two define that do exactly the same. Also move the check from configure.ac to syshead.h since it is really only checking for Windows. Signed-off-by: Arne Schwabe --- configure.ac | 8 -------- src/openvpn/platform.c | 2 +- src/openvpn/ssl_verify.c | 2 +- src/openvpn/syshead.h | 6 ++++-- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/configure.ac b/configure.ac index a67bf2595..3b4d3cbc7 100644 --- a/configure.ac +++ b/configure.ac @@ -1133,14 +1133,6 @@ if test -n "${GIT}" -a -d "${srcdir}/.git"; then fi AC_MSG_RESULT([${GIT_CHECKOUT}]) -if test -n "${SP_PLATFORM_WINDOWS}"; then - AC_DEFINE_UNQUOTED([PATH_SEPARATOR], ['\\\\'], [Path separator]) #" - AC_DEFINE_UNQUOTED([PATH_SEPARATOR_STR], ["\\\\"], [Path separator]) #" -else - AC_DEFINE_UNQUOTED([PATH_SEPARATOR], ['/'], [Path separator]) - AC_DEFINE_UNQUOTED([PATH_SEPARATOR_STR], ["/"], [Path separator]) -fi - dnl enable --x509-username-field feature if requested if test "${enable_x509_alt_username}" = "yes"; then if test "${with_crypto_library}" = "mbedtls" ; then diff --git a/src/openvpn/platform.c b/src/openvpn/platform.c index c63c1d994..bf7b1aa0a 100644 --- a/src/openvpn/platform.c +++ b/src/openvpn/platform.c @@ -486,7 +486,7 @@ platform_gen_path(const char *directory, const char *filename, struct buffer out = alloc_buf_gc(outsize, gc); char dirsep[2]; - dirsep[0] = OS_SPECIFIC_DIRSEP; + dirsep[0] = PATH_SEPARATOR; dirsep[1] = '\0'; if (directory) diff --git a/src/openvpn/ssl_verify.c b/src/openvpn/ssl_verify.c index 7608155cd..14aaf2bf7 100644 --- a/src/openvpn/ssl_verify.c +++ b/src/openvpn/ssl_verify.c @@ -616,7 +616,7 @@ verify_check_crl_dir(const char *crl_dir, openvpn_x509_cert_t *cert, goto cleanup; } - if (!openvpn_snprintf(fn, sizeof(fn), "%s%c%s", crl_dir, OS_SPECIFIC_DIRSEP, serial)) + if (!openvpn_snprintf(fn, sizeof(fn), "%s%c%s", crl_dir, PATH_SEPARATOR, serial)) { msg(D_HANDSHAKE, "VERIFY CRL: filename overflow"); goto cleanup; diff --git a/src/openvpn/syshead.h b/src/openvpn/syshead.h index a964ffd35..28ccca087 100644 --- a/src/openvpn/syshead.h +++ b/src/openvpn/syshead.h @@ -432,9 +432,11 @@ typedef unsigned short sa_family_t; * Directory separation char */ #ifdef _WIN32 -#define OS_SPECIFIC_DIRSEP '\\' +#define PATH_SEPARATOR '\\' +#define PATH_SEPARATOR_STR "\\" #else -#define OS_SPECIFIC_DIRSEP '/' +#define PATH_SEPARATOR '/' +#define PATH_SEPARATOR_STR "/" #endif /* From patchwork Wed Apr 21 03:43:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 1753 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director14.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id uOnmElcsgGDPKAAAIUCqbw (envelope-from ) for ; Wed, 21 Apr 2021 09:44:55 -0400 Received: from proxy14.mail.ord1d.rsapps.net ([172.30.191.6]) by director14.mail.ord1d.rsapps.net with LMTP id 6DGwElcsgGBaRQAAeJ7fFg (envelope-from ) for ; Wed, 21 Apr 2021 09:44:55 -0400 Received: from smtp5.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy14.mail.ord1d.rsapps.net with LMTPS id uAnyMlcsgGB2VQAAtEH5vw (envelope-from ) for ; Wed, 21 Apr 2021 09:44:55 -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: smtp5.gate.ord1d.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=rfc2549.org X-Suspicious-Flag: YES X-Classification-ID: c097106a-a2a7-11eb-9e56-525400d73c44-1-1 Received: from [216.105.38.7] ([216.105.38.7:48188] helo=lists.sourceforge.net) by smtp5.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id C3/22-32150-65C20806; Wed, 21 Apr 2021 09:44:54 -0400 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 1lZD9D-0007Uc-DF; Wed, 21 Apr 2021 13:44:07 +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 1lZD9A-0007Tx-6L for openvpn-devel@lists.sourceforge.net; Wed, 21 Apr 2021 13:44:04 +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-Subscribe:List-Post:List-Owner:List-Archive; bh=o5fGE5Gtmg4ABkWfIbtzIUgDQnAQXMRY7pGDkWkYOms=; b=ArHX4Lt5q0ACAnMwNC2scm9EQH DZQHm/wTBrf+DEAb8yu5XQeHvkTLYfDENicuFr26zHikrZ3IO+pG4RkesA3GDQd32pL6gZAtMlyXU lmLVsUZKu9DCfP2jWYoGoSFsTAEWlnQHS8kIjHSudHFlxUkknEE6gUtEZA+WE+/Lf1hQ=; 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-Subscribe: List-Post:List-Owner:List-Archive; bh=o5fGE5Gtmg4ABkWfIbtzIUgDQnAQXMRY7pGDkWkYOms=; b=IOex4YB3GjiTs2HK8IDSQvZCx2 BIrpDtRcnhbf33VAua1fkXaNmvOuaIWjThtopQ7Lfy4V5NyhFfld5hjBZsmnqdNtJtB8hdVp4f6Ux GEyR3MbelY7wlmtkWTyAsgIFmr/YHmGL6xU21I70xlhpZCwqPgLHAGN2abaT/FF/oztQ=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) id 1lZD91-0004ZL-Tf for openvpn-devel@lists.sourceforge.net; Wed, 21 Apr 2021 13:44:04 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.94 (FreeBSD)) (envelope-from ) id 1lZD8u-0004Qa-Av for openvpn-devel@lists.sourceforge.net; Wed, 21 Apr 2021 15:43:48 +0200 Received: (nullmailer pid 1950460 invoked by uid 10006); Wed, 21 Apr 2021 13:43:48 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Wed, 21 Apr 2021 15:43:48 +0200 Message-Id: <20210421134348.1950392-7-arne@rfc2549.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210421134348.1950392-1-arne@rfc2549.org> References: <20210421134348.1950392-1-arne@rfc2549.org> 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: rfc2549.org] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Headers-End: 1lZD91-0004ZL-Tf Subject: [Openvpn-devel] [PATCH 7/7] Remove a number of platform specific checks in configure.ac 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 - Remove windows XP/old mingw compat code in socket.c - Use _WIN32 instead checking for existence of windows.h, winsock2.h and ws2tcpip.h in autconf - Remove check for unlink. The last remaining use is a check inside a Unix socket. - Even Windows has umask, so remove the check for it Signed-off-by: Arne Schwabe --- configure.ac | 11 +++++------ src/compat/compat.h | 5 +---- src/openvpn/event.c | 4 ++++ src/openvpn/socket.c | 16 ---------------- src/openvpn/syshead.h | 6 ++---- 5 files changed, 12 insertions(+), 30 deletions(-) diff --git a/configure.ac b/configure.ac index 3b4d3cbc7..94897c863 100644 --- a/configure.ac +++ b/configure.ac @@ -412,7 +412,6 @@ AC_CHECK_HEADERS([ \ unistd.h dlfcn.h \ netinet/in.h netinet/in_systm.h \ netinet/tcp.h arpa/inet.h netdb.h \ - windows.h winsock2.h ws2tcpip.h \ versionhelpers.h \ ]) AC_CHECK_HEADERS([ \ @@ -438,13 +437,13 @@ SOCKET_INCLUDES=" #ifdef HAVE_NETINET_IN_H #include #endif -#ifdef HAVE_WINDOWS_H +#ifdef _WIN32 #include #endif -#ifdef HAVE_WINSOCK2_H +#ifdef _WIN32 #include #endif -#ifdef HAVE_WS2TCPIP_H +#ifdef _WIN32 #include #endif #ifdef HAVE_NETINET_IN_SYSTM_H @@ -623,8 +622,8 @@ AC_CHECK_FUNCS([ \ daemon chroot getpwnam setuid nice system getpid dup dup2 \ syslog openlog mlockall getrlimit getgrnam setgid \ setgroups flock readv writev time gettimeofday \ - setsid chdir getpeername unlink \ - chsize ftruncate execve getpeereid umask basename dirname access \ + setsid chdir getpeername \ + chsize ftruncate execve getpeereid basename dirname access \ epoll_create strsep \ ]) diff --git a/src/compat/compat.h b/src/compat/compat.h index 2bf48a5eb..026974a81 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -24,11 +24,8 @@ #ifndef COMPAT_H #define COMPAT_H -#ifdef HAVE_WINSOCK2_H +#ifdef _WIN32 #include -#endif - -#ifdef HAVE_WS2TCPIP_H #include #endif diff --git a/src/openvpn/event.c b/src/openvpn/event.c index 14a25155c..d766f8be8 100644 --- a/src/openvpn/event.c +++ b/src/openvpn/event.c @@ -35,6 +35,10 @@ #include "event.h" #include "fdmisc.h" +#if EPOLL +#include +#endif + #include "memdbg.h" /* diff --git a/src/openvpn/socket.c b/src/openvpn/socket.c index 4e13c65e8..01c65b3e0 100644 --- a/src/openvpn/socket.c +++ b/src/openvpn/socket.c @@ -1385,14 +1385,6 @@ socket_listen_accept(socket_descriptor_t sd, return new_sd; } -/* older mingw versions and WinXP do not have this define, - * but Vista and up support the functionality - just define it here - */ -#ifdef _WIN32 -#ifndef IPV6_V6ONLY -#define IPV6_V6ONLY 27 -#endif -#endif void socket_bind(socket_descriptor_t sd, struct addrinfo *local, @@ -3905,10 +3897,7 @@ socket_bind_unix(socket_descriptor_t sd, const char *prefix) { struct gc_arena gc = gc_new(); - -#ifdef HAVE_UMASK const mode_t orig_umask = umask(0); -#endif if (bind(sd, (struct sockaddr *) local, sizeof(struct sockaddr_un))) { @@ -3919,10 +3908,7 @@ socket_bind_unix(socket_descriptor_t sd, sockaddr_unix_name(local, "NULL")); } -#ifdef HAVE_UMASK umask(orig_umask); -#endif - gc_free(&gc); } @@ -3967,12 +3953,10 @@ void socket_delete_unix(const struct sockaddr_un *local) { const char *name = sockaddr_unix_name(local, NULL); -#ifdef HAVE_UNLINK if (name && strlen(name)) { unlink(name); } -#endif } bool diff --git a/src/openvpn/syshead.h b/src/openvpn/syshead.h index 28ccca087..15de0b46d 100644 --- a/src/openvpn/syshead.h +++ b/src/openvpn/syshead.h @@ -100,10 +100,6 @@ #include #endif -#ifdef HAVE_IO_H -#include -#endif - #ifdef HAVE_SYS_FILE_H #include #endif @@ -338,6 +334,8 @@ typedef int MIB_TCP_STATE; #include #include #include +#include + /* The following two headers are needed of PF_INET6 */ #include #include