From patchwork Tue Jun 12 22:12:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 364 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director10.mail.ord1d.rsapps.net ([172.28.255.1]) by backend30.mail.ord1d.rsapps.net (Dovecot) with LMTP id 4zwbCdLSIFsyWQAAIUCqbw for ; Wed, 13 Jun 2018 04:16:18 -0400 Received: from director4.mail.ord1c.rsapps.net ([172.28.255.1]) by director10.mail.ord1d.rsapps.net (Dovecot) with LMTP id e4fFCNLSIFv0egAApN4f7A ; Wed, 13 Jun 2018 04:16:18 -0400 Received: from smtp35.gate.ord1c ([172.28.255.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by director4.mail.ord1c.rsapps.net with LMTP id GJL+EMbSIFsFGQAAsEL7Xg ; Wed, 13 Jun 2018 04:16:06 -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: smtp35.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=unstable.cc X-Suspicious-Flag: YES X-Classification-ID: 0bab649a-6ee2-11e8-a5aa-5452002f485d-1-1 Received: from [216.105.38.7] ([216.105.38.7:4479] helo=lists.sourceforge.net) by smtp35.gate.ord1c.rsapps.net (envelope-from ) (ecelerity 4.2.1.56364 r(Core:4.2.1.14)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 7B/B2-27412-1D2D02B5; Wed, 13 Jun 2018 04:16:17 -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 1fT0wG-0002jL-5O; Wed, 13 Jun 2018 08:15:32 +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 1fT0wE-0002jE-BI for openvpn-devel@lists.sourceforge.net; Wed, 13 Jun 2018 08:15:30 +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=v9Mcgv+NLS2pObCriW7zfcAt8h18X6C7GQppdqWRzOc=; b=B4ORF9Kyh8YXEgtlsQ2Ggp+n1/ R2nwlS1KOVm7kcEyqRUoSWwzgOTTb+tCVkqOaLoAizN5dv6cwWL9zYwxC5TBTdHLqaHixnGH7kOZk 7kRhJLqw4lFzqGIEkPrDBs6BWdi+4D+J80A6o8AKN44+YIk/bGdx1XZkwhTFZAhnG8Kg=; 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=v9Mcgv+NLS2pObCriW7zfcAt8h18X6C7GQppdqWRzOc=; b=O7KBwHjl403q6rfjbfyUCoy7JJ wxKELPjfXb9e6KLV0AeNf/HzLL1PPsd6KdjvBBWTUgdwXCyR9w4C2MFS6mi4xiGqUOuopoZmJwI0L NVgtKyAgGIc+SiXcsdpgCWQHhbsV+K62aAXYW+LnHgG4N77o69pPFVQwkDzVEwhh40tY=; Received: from s2.neomailbox.net ([5.148.176.60]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) id 1fT0wA-006bdw-5J for openvpn-devel@lists.sourceforge.net; Wed, 13 Jun 2018 08:15:30 +0000 From: Antonio Quartulli To: openvpn-devel@lists.sourceforge.net Date: Wed, 13 Jun 2018 16:12:14 +0800 Message-Id: <20180613081218.1834-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_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record X-Headers-End: 1fT0wA-006bdw-5J Subject: [Openvpn-devel] [PATCH 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 and gc local variables. 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 always freed tun: always pass a valid tt pointer tun: get rid of tt->did_ifconfig member src/openvpn/init.c | 7 +- src/openvpn/tun.c | 442 ++++++++++++++++++++++----------------------- src/openvpn/tun.h | 1 - 3 files changed, 223 insertions(+), 227 deletions(-)