From patchwork Sun Aug 4 23:25:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 792 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 with LMTP id OIn9HX/2R10CEwAAIUCqbw for ; Mon, 05 Aug 2019 05:27:27 -0400 Received: from proxy5.mail.ord1d.rsapps.net ([172.30.191.6]) by director7.mail.ord1d.rsapps.net with LMTP id eK2UHX/2R11afwAAovjBpQ ; Mon, 05 Aug 2019 05:27:27 -0400 Received: from smtp5.gate.ord1c ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy5.mail.ord1d.rsapps.net with LMTP id QHuQHX/2R11oIAAA8Zzt7w ; Mon, 05 Aug 2019 05:27:27 -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.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: 3d1c8b6a-b763-11e9-8fc5-a4badb0b200d-1-1 Received: from [216.105.38.7] ([216.105.38.7:40086] helo=lists.sourceforge.net) by smtp5.gate.ord1c.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 4A/40-14756-F76F74D5; Mon, 05 Aug 2019 05:27:27 -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 1huZFo-0003lH-Hi; Mon, 05 Aug 2019 09:26:08 +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 1huZFn-0003l1-Ds for openvpn-devel@lists.sourceforge.net; Mon, 05 Aug 2019 09:26:07 +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:Cc:To:From:Sender:Reply-To: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=RM31X4Hp7LvfN8bcSbbqwa1bxA00/fA36HOa8qSTkzM=; b=cnf4u+5Zsf43eRPPxAJ5P0oHN6 aqe/+TQWEw2PpEX9Ghowej2GjWCs1qmcE00xS/ZHmkFDZIWDx2nA8O9mlLu2hxqvBc0aLNCtnbtv0 +n9HdL/cKQJk/I20cPV+HSZYypo9a7jXwK8gIlhvgEoAeIL1C0R0K8/88XoOrJ+yLAv8=; 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:Cc:To:From :Sender:Reply-To: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=RM31X4Hp7LvfN8bcSbbqwa1bxA00/fA36HOa8qSTkzM=; b=U pu2+Rs+Ulmk6mo4RzeTAkLrqzLkCJwD4/DB7BN9XnHTWYBbVzM419B7u/nz0q7DC3GC0ldttTN4Oa 0spkw1lFrx3n63zSt6zv4qhhtUzosunmSSTgloNHaohsTW/fdldt9PPA66/xOk/U87BVvStTI5l+I hu4qs1pJPAgTHmaI=; Received: from s2.neomailbox.net ([5.148.176.60]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) id 1huZFl-00BSdE-12 for openvpn-devel@lists.sourceforge.net; Mon, 05 Aug 2019 09:26:07 +0000 From: Antonio Quartulli To: openvpn-devel@lists.sourceforge.net Date: Mon, 5 Aug 2019 11:25:23 +0200 Message-Id: <20190805092529.9467-1-a@unstable.cc> MIME-Version: 1.0 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 https://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: 1huZFl-00BSdE-12 Subject: [Openvpn-devel] [PATCH 0/6] sitnl follow-up 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 Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox From: Antonio Quartulli Hi all, this small patchset aims at tackling most of the concerns raised by Gert while merging the sitnl introduction patchset. All patches are fairly small, but they are a bit intertwined (they change nearby lines), therefore it would be better to merge them in the provided order to avoid ugly merge conflicts. Cheers, Antonio Quartulli (6): sitnl: harden strncpy() by forcing arguments to have the same length networking/best_gw: remove useless prefixlen parameter networking: extend API for better memory management tun.c: undo_ifconfig_ipv4/6 remove useless gc argument networking_sitnl.c: uncrustify file route.c: simplify ifdef logic src/openvpn/networking.h | 33 +++++++++-- src/openvpn/networking_iproute2.c | 78 ++++++++++--------------- src/openvpn/networking_iproute2.h | 1 + src/openvpn/networking_sitnl.c | 96 +++++++++++++++++++++---------- src/openvpn/openvpn.c | 1 + src/openvpn/route.c | 32 ++++++----- src/openvpn/route.h | 6 +- src/openvpn/tun.c | 28 ++++----- 8 files changed, 165 insertions(+), 110 deletions(-)