From patchwork Sat Nov 11 03:22:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 61 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director5.mail.ord1d.rsapps.net ([172.27.255.58]) by backend31.mail.ord1d.rsapps.net (Dovecot) with LMTP id i/4pBMYHB1q7UQAAgoeIoA for ; Sat, 11 Nov 2017 09:23:02 -0500 Received: from proxy10.mail.iad3a.rsapps.net ([172.27.255.58]) by director5.mail.ord1d.rsapps.net (Dovecot) with LMTP id 2QzyAMYHB1p4CAAAsdCWiw ; Sat, 11 Nov 2017 09:23:02 -0500 Received: from smtp37.gate.iad3a ([172.27.255.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy10.mail.iad3a.rsapps.net (Dovecot) with LMTP id Emi0N8UHB1oEYQAAnQ/bqA ; Sat, 11 Nov 2017 09:23:01 -0500 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.34.181.88] Authentication-Results: smtp37.gate.iad3a.rsapps.net; iprev=pass policy.iprev="216.34.181.88"; 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=greenie.muc.de X-Classification-ID: d29fbea6-c6eb-11e7-bcb6-782bcb5bc67a-1-1 Received: from [216.34.181.88] ([216.34.181.88:35282] helo=lists.sourceforge.net) by smtp37.gate.iad3a.rsapps.net (envelope-from ) (ecelerity 4.2.1.56364 r(Core:4.2.1.14)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id D4/93-28124-5C7070A5; Sat, 11 Nov 2017 09:23:01 -0500 Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.89) (envelope-from ) id 1eDWg7-0005ok-AB; Sat, 11 Nov 2017 14:22:35 +0000 Received: from sfi-mx-1.v28.ch3.sourceforge.com ([172.29.28.191] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1eDWg6-0005od-KR for openvpn-devel@lists.sourceforge.net; Sat, 11 Nov 2017 14:22:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=References:In-Reply-To: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:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=0Z6ZPzaJnAwoy7szZat0pz9fMd+Znr0djUA9MkgoWTc=; b=IjPaVPdwA/5x/HateVB6QGRwBR VaI0mXmKPK/zMoGDYysFin1wpCeunGYPHXdKDmcyEtmPgMFG8Pjar97muQLv+Vqou+vYtiM3LAvyA 6EPR6Dnf7v7nxH59Xy5p6YjSGXGtFfocyQHir1YVXldXwTRAKof9u2JIS2rhhMDi1zEY=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=References:In-Reply-To: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:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=0Z6ZPzaJnAwoy7szZat0pz9fMd+Znr0djUA9MkgoWTc=; b=aN2NSs7zrJ+2CTWj1dHuOzcvP2 ipQ9XF7lohk/8QjpXwrjg6l51C/Zy2uLQv1Gpl/hF/azXrYpZx4kisif+F80hvAniSh6pGM3U3qiC cC8B0b3TcmWjTJWiHFTBd3h8VZ5e8BIl9r7Fz8ehFYL3+Gw5blMEbIqtpxrreTHzzw30=; Received: from delta2.greenie.net ([194.97.144.211]) by sfi-mx-1.v28.ch3.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) id 1eDWg5-0003rG-Lw for openvpn-devel@lists.sourceforge.net; Sat, 11 Nov 2017 14:22:34 +0000 Received: from mobileV.green.sophos ([IPv6:2001:1a80:2000:1:dfb:d8a7:bc0c:c5ed]) (authenticated bits=0) by delta2.greenie.net (8.15.2/8.12.11) with ESMTPSA id vABEMRh0044964 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NO) for ; Sat, 11 Nov 2017 15:22:27 +0100 (CET) From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Sat, 11 Nov 2017 15:22:30 +0100 Message-Id: <20171111142230.3288-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20171111133649.20192-1-gert@greenie.muc.de> References: <20171111133649.20192-1-gert@greenie.muc.de> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (delta2.greenie.net [IPv6:2001:608:0:1007:a00:20ff:fefe:4bd2]); Sat, 11 Nov 2017 15:22:27 +0100 (CET) X-Virus-Status: Clean X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 SPF_PASS SPF: sender matches SPF record X-Headers-End: 1eDWg5-0003rG-Lw Subject: [Openvpn-devel] [PATCH v2] Remove warning on pushed tun-ipv6 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: , MIME-Version: 1.0 Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox tun-ipv6 is a no-op nowadays, and we print a warning to let users know - which is not helpful for server-pushed tun-ipv6 (which might be the result of --server-ipv6 automatically pushing this). So, remove the warning if parsing pushed options. Also, remove the VERIFY_PERMISSION() call here which has side effects on the "which class of options got pushed, do we need to act on them later on?" flag set. v2: use existing pull_mode flag Signed-off-by: Gert Doering Acked-by: Arne Reviewed-by: Steffan Karger Acked-by: Steffan Karger --- src/openvpn/options.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 641a26e2..4caa2cd1 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -5233,8 +5233,10 @@ add_option(struct options *options, } else if (streq(p[0], "tun-ipv6") && !p[1]) { - VERIFY_PERMISSION(OPT_P_UP); - msg(M_WARN, "Note: option tun-ipv6 is ignored because modern operating systems do not need special IPv6 tun handling anymore."); + if ( !pull_mode ) + { + msg(M_WARN, "Note: option tun-ipv6 is ignored because modern operating systems do not need special IPv6 tun handling anymore."); + } } #ifdef ENABLE_IPROUTE else if (streq(p[0], "iproute") && p[1] && !p[2])