From patchwork Mon Aug 10 04:36:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 1355 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director12.mail.ord1d.rsapps.net ([172.28.255.1]) by backend30.mail.ord1d.rsapps.net with LMTP id +DMqGMpbMV99fQAAIUCqbw for ; Mon, 10 Aug 2020 10:38:02 -0400 Received: from proxy7.mail.ord1c.rsapps.net ([172.28.255.1]) by director12.mail.ord1d.rsapps.net with LMTP id 6PYDGMpbMV8gJQAAIasKDg (envelope-from ) for ; Mon, 10 Aug 2020 10:38:02 -0400 Received: from smtp22.gate.ord1c ([172.28.255.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy7.mail.ord1c.rsapps.net with LMTP id sOGSF8pbMV+VHwAAknS3pQ ; Mon, 10 Aug 2020 10:38:02 -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: smtp22.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=rfc2549.org X-Suspicious-Flag: YES X-Classification-ID: 178dd7d6-db17-11ea-b7a9-a0369f0d84d2-1-1 Received: from [216.105.38.7] ([216.105.38.7:44576] helo=lists.sourceforge.net) by smtp22.gate.ord1c.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 1C/74-18262-9CB513F5; Mon, 10 Aug 2020 10:38:02 -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 1k58vU-0004jN-5p; Mon, 10 Aug 2020 14:37:24 +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 1k58vS-0004ir-FE for openvpn-devel@lists.sourceforge.net; Mon, 10 Aug 2020 14:37:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding: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=68tsOO4Geaoj+va0kPnEy+3Z008X/igW5WvVKaV5qeo=; b=Yj5k164p4CPB80QEsDTNiYIfLc f2EsRKQ5vdAdGnhjpgyx/xXbFRmAhSjN+r0N9+yFjXp52J1AF86QXttrm3IHOVXb/KTPf0y3e+glF 1nfchDO1Y58/1zEnUimqkn4mGHbjUrWULe4bK8+VermAqK6bjonyKojNctJZwxZG621Y=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:MIME-Version: Content-Type:Content-Transfer-Encoding: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=68tsOO4Geaoj+va0kPnEy+3Z008X/igW5WvVKaV5qeo=; b=dkdZXzoXNZE801nzto5Pfrjo7n yugp9EYfZB3kR4cNtiQ1JgWs2gXD2+hgyr3vUZ1VE3u8ILgtACxWbzMaL2/VT+CzFBvIqComVTp9J ZlhkQmnZByd1Ckj6ygaIN0j6czqrE0ssE1T+r1fB2kTZgdHTVRAp/EnaXowscGn8x3WA=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1k58vR-002taR-BI for openvpn-devel@lists.sourceforge.net; Mon, 10 Aug 2020 14:37:22 +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 1k58vD-000ORo-Tn for openvpn-devel@lists.sourceforge.net; Mon, 10 Aug 2020 16:37:07 +0200 Received: (nullmailer pid 5879 invoked by uid 10006); Mon, 10 Aug 2020 14:37:07 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Mon, 10 Aug 2020 16:36:50 +0200 Message-Id: <20200810143707.5834-1-arne@rfc2549.org> X-Mailer: git-send-email 2.17.1 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 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: 1k58vR-002taR-BI Subject: [Openvpn-devel] [PATCH 00/17] OpenVPN refactoring 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: , MIME-Version: 1.0 Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox This a number of patches that cleanup or refactor code in order to improve either code quality or prepare other features. A few patches that were necessary as prerequisite for NCP or client-connect patches have been already extractracted from the refactoring and been applied. I id hold off sending these patches, so we could concentrate on getting the necessary patches for 2.5 out. Arne Schwabe (17): Refactor/Reformat tls_pre_decrypt Cleanup tls_pre_decrypt_lite and tls_pre_encrypt Clean up a number of leftover C89 initialisations in ssl.c Minor cleanup in push.c Remove buf argument from link_socket_set_outgoing_addr Remove a number of check/do_work wrapper calls from coarse_timers Split pf_check_reload check and check timer in process_coarse_timers Rename check_ping_restart_dowork to trigger_ping_timeout_signal Eliminate check_fragment function Eliminate check_incoming_control_channel wrapper function Eliminate check_tls wrapper function Merge check_coarse_timers and check_coarse_timers_dowork Remove S_OP_NORMAL key state. Skip existing interfaces on opening the first available utun on macOS Refactor key_state_export_keying_material functions Move parsing IV_PROTO to separate function Move openvpn specific key expansion into its own function src/openvpn/forward.c | 367 ++++------- src/openvpn/forward.h | 18 +- src/openvpn/multi.c | 49 +- src/openvpn/pf.c | 4 +- src/openvpn/ping.c | 6 +- src/openvpn/ping.h | 13 +- src/openvpn/push.c | 7 +- src/openvpn/socket.c | 3 +- src/openvpn/socket.h | 35 +- src/openvpn/ssl.c | 1234 +++++++++++++++++++------------------ src/openvpn/ssl_backend.h | 14 +- src/openvpn/ssl_common.h | 9 +- src/openvpn/ssl_mbedtls.c | 22 +- src/openvpn/ssl_openssl.c | 32 +- src/openvpn/status.c | 13 - src/openvpn/status.h | 2 - src/openvpn/tun.c | 9 +- 17 files changed, 878 insertions(+), 959 deletions(-)