From patchwork Tue Oct 8 22:51:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 850 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director8.mail.ord1d.rsapps.net ([172.31.255.6]) by backend30.mail.ord1d.rsapps.net with LMTP id OK+SEpO0nV0FVwAAIUCqbw for ; Wed, 09 Oct 2019 06:21:07 -0400 Received: from proxy16.mail.iad3b.rsapps.net ([172.31.255.6]) by director8.mail.ord1d.rsapps.net with LMTP id sNNxD5O0nV1aDQAAfY0hYg ; Wed, 09 Oct 2019 06:21:07 -0400 Received: from smtp37.gate.iad3b ([172.31.255.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy16.mail.iad3b.rsapps.net with LMTP id 0E3oCJO0nV3ZHQAAPj+4aA ; Wed, 09 Oct 2019 06:21:07 -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: smtp37.gate.iad3b.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=greenie.muc.de X-Suspicious-Flag: YES X-Classification-ID: 80ae5072-ea7e-11e9-8727-5254002ca64a-1-1 Received: from [216.105.38.7] ([216.105.38.7:46402] helo=lists.sourceforge.net) by smtp37.gate.iad3b.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 83/ED-22371-294BD9D5; Wed, 09 Oct 2019 06:21:06 -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 1iI952-0000aS-DF; Wed, 09 Oct 2019 10:20:28 +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 1iI950-0000aJ-JS for openvpn-devel@lists.sourceforge.net; Wed, 09 Oct 2019 10:20:26 +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:To:From:Sender:Reply-To:Cc: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=riB96M26iRquhcro1BHRjYqNL5rktBnfENKzTTr94kU=; b=bQy/iyaZ0JmS8Uyl7SZy6zMq86 qRT24+a2sTC0Ax3Xw0mulbIhh2Fwith46YP0H3EZUkqCcoMBwaBjiD5JHrP0o4YlxtTcFHvxDgfRI qfr2R40s0bhKvlSRi3v40BZiu1h62q0U1Wum+5ww6oofH4Yi552NXTxMfwrIIST5MNx4=; 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:To:From: Sender:Reply-To:Cc: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=riB96M26iRquhcro1BHRjYqNL5rktBnfENKzTTr94kU=; b=Y aaDx/y0Tkl+c8WqpdfElsYGuk/K4UvZfgbbU1cJEX6a8thKKKssKUxLfHXhR10vlUICToCu8rtKbD x+KT+QNpKa+T2mmF6fbltouHnM4AmXdG7MfTCmoIYmtv9jUNErKSOWu/JtOnQEw4h+wdfLHU6pxv3 vonF3nXLsF4XESbg=; Received: from vmail1.greenie.net ([195.30.8.66]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1iI94y-00B81y-EN for openvpn-devel@lists.sourceforge.net; Wed, 09 Oct 2019 10:20:26 +0000 Received: from oi2019.ov.greenie.net (oi2019.ov.greenie.net [IPv6:2001:608:0:814:0:0:f000:20]) by vmail1.greenie.net (8.15.2/8.12.11) with ESMTPS id x999rf4L013644 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Wed, 9 Oct 2019 11:53:41 +0200 (CEST) Received: from oi2019.ov.greenie.net (oi2019 [127.0.0.1]) by oi2019.ov.greenie.net (8.15.2+Sun/8.15.2) with ESMTP id x999q07d009382 for ; Wed, 9 Oct 2019 11:52:00 +0200 (CEST) Received: (from gert@localhost) by oi2019.ov.greenie.net (8.15.2+Sun/8.15.2/Submit) id x999q0kg009381 for openvpn-devel@lists.sourceforge.net; Wed, 9 Oct 2019 11:52:00 +0200 (CEST) From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Wed, 9 Oct 2019 11:51:59 +0200 Message-Id: <20191009095200.9337-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (vmail1.greenie.net [IPv6:2001:608:1:995a:20c:29ff:feb8:10eb]); Wed, 09 Oct 2019 11:53:41 +0200 (CEST) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: muc.de] 0.2 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: 1iI94y-00B81y-EN Subject: [Openvpn-devel] [PATCH 1/2] repair tap mode on OpenSolaris/OpenIndiana 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: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox commit 611fcbc48 joined the two distinct calls for "add ipv6 address to tap interface" and "set MTU" for Solaris - but due to peculiarities on how this platform handles IPv6 addresses ("ifconfig addif" creates a new "tap0:1" subinterface with the new address - which does not have a distinct MTU) this does not work. un-join calls again. Signed-off-by: Gert Doering Acked-by: Antonio Quartulli --- src/openvpn/tun.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 0591df65..ce23eb6a 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -937,9 +937,11 @@ do_ifconfig_ipv6(struct tuntap *tt, const char *ifname, int tun_mtu, * server will ignore the DHCPv6 packets anyway. So we don't. */ - /* static IPv6 addresses need to go to a subinterface (tap0:1) */ - argv_printf(&argv, "%s %s inet6 addif %s/%d mtu %d up", IFCONFIG_PATH, - ifname, ifconfig_ipv6_local, tt->netbits_ipv6, tun_mtu); + /* static IPv6 addresses need to go to a subinterface (tap0:1) + * and we cannot set an mtu here (must go to the "parent") + */ + argv_printf(&argv, "%s %s inet6 addif %s/%d up", IFCONFIG_PATH, + ifname, ifconfig_ipv6_local, tt->netbits_ipv6 ); } argv_msg(M_INFO, &argv); @@ -947,6 +949,14 @@ do_ifconfig_ipv6(struct tuntap *tt, const char *ifname, int tun_mtu, { solaris_error_close(tt, es, ifname, true); } + + if (tt->type != DEV_TYPE_TUN) + { + argv_printf(&argv, "%s %s inet6 mtu %d", IFCONFIG_PATH, + ifname, tun_mtu); + argv_msg(M_INFO, &argv); + openvpn_execve_check(&argv, es, 0, "Solaris ifconfig IPv6 mtu failed"); + } #elif defined(TARGET_OPENBSD) || defined(TARGET_NETBSD) \ || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) \ || defined(TARGET_DRAGONFLY)