From patchwork Wed Jun 13 02:28:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 370 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director7.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net (Dovecot) with LMTP id o9BSKFIOIVs3aQAAIUCqbw for ; Wed, 13 Jun 2018 08:30:10 -0400 Received: from proxy16.mail.ord1d.rsapps.net ([172.30.191.6]) by director7.mail.ord1d.rsapps.net (Dovecot) with LMTP id /BexAFIOIVsqPwAAovjBpQ ; Wed, 13 Jun 2018 08:30:10 -0400 Received: from smtp6.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy16.mail.ord1d.rsapps.net with LMTP id aLzMJ1IOIVsBOgAAetu3IA ; Wed, 13 Jun 2018 08:30:10 -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: smtp6.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=unstable.cc X-Suspicious-Flag: YES X-Classification-ID: 8271b1d8-6f05-11e8-8880-52540050e3e0-1-1 Received: from [216.105.38.7] ([216.105.38.7:4768] helo=lists.sourceforge.net) by smtp6.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.1.56364 r(Core:4.2.1.14)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 91/99-11713-15E012B5; Wed, 13 Jun 2018 08:30:09 -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.90_1) (envelope-from ) id 1fT4tk-0006PE-Ko; Wed, 13 Jun 2018 12:29:12 +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 1fT4tj-0006P2-OD for openvpn-devel@lists.sourceforge.net; Wed, 13 Jun 2018 12:29:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: 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=/s8jTUuXEZVt4S4n/FZHOkUBzRww8eAkwLE+dvs8zko=; b=f/LnfB+KCJ2qXfQSRX/QeJCAyP 2cwvaxlYXX7c5ASzUGke8PlAPXqt+R0gj/p+3Gd0PScXw8GhxeJ4wTNDCJwswY82gNpL18g0umHCC 0Wj+Aq9mMLyJY+RolIoOZh/svKBAHNkCPimGivWXynHw6NJHHSdV1MSnPh/gY1zGcz1s=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: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=/s8jTUuXEZVt4S4n/FZHOkUBzRww8eAkwLE+dvs8zko=; b=GPyjZEEMpQo/7qmoTvYpun3YHo y2JbwSV7nHg6TurNdeuDzJZxW6ymjGBdQHszQJIreO++bN2EYHf6OwklOhG382aN0zp48HHPL3WnH bH65sDlrzNigi6fVV3ropYwbelNPnyKL3YttXtGjx1ipil50jDAjSBTEi/vr4AQtIcOA=; Received: from s2.neomailbox.net ([5.148.176.60]) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) id 1fT4ti-005sOI-8R for openvpn-devel@lists.sourceforge.net; Wed, 13 Jun 2018 12:29:11 +0000 From: Antonio Quartulli To: openvpn-devel@lists.sourceforge.net Date: Wed, 13 Jun 2018 20:28:21 +0800 Message-Id: <20180613122824.4207-1-a@unstable.cc> X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [5.148.176.60 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.2 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1fT4ti-005sOI-8R Subject: [Openvpn-devel] [PATCH v2 0/3] pre-ipv6-only clean up patchset 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: , Cc: Antonio Quartulli MIME-Version: 1.0 Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox This patchset is the result of some of Gert's comment on the IPv6-only patchset. For this reason, this patchset is expected to be applied *before* applying future versions (v3...) of the IPv6-only patchset. This patchset is mostly about restyling the code a bit and getting rid of unused members. Hence, there is no new feature being introduced. Patch 1 is fixing potential memory leaks resulting from not releasing some argv local variables and removes unused gc_areas. This version 2 is basically addressing all the coments raised by Gert on the previous version. Detailed changes are rpeorted in each patch. Cheers, p.s. buildbot is currently unusable due to the ongoing maintenance on the OpenVPN servers and therefor eonly local tests have been performed. Antonio Quartulli (3): tun: ensure gc and argv are properly handled tun: always pass a valid tt pointer tun: get rid of tt->did_ifconfig member src/openvpn/init.c | 7 +- src/openvpn/tun.c | 513 ++++++++++++++++++++++----------------------- src/openvpn/tun.h | 1 - 3 files changed, 254 insertions(+), 267 deletions(-)