From patchwork Tue Oct 8 22:52:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 851 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director8.mail.ord1d.rsapps.net ([172.27.255.9]) by backend30.mail.ord1d.rsapps.net with LMTP id uE3DMZO0nV0FVwAAIUCqbw for ; Wed, 09 Oct 2019 06:21:07 -0400 Received: from proxy21.mail.iad3a.rsapps.net ([172.27.255.9]) by director8.mail.ord1d.rsapps.net with LMTP id YPK1LpO0nV0EDgAAfY0hYg ; Wed, 09 Oct 2019 06:21:07 -0400 Received: from smtp36.gate.iad3a ([172.27.255.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy21.mail.iad3a.rsapps.net with LMTP id CLj5J5O0nV3zagAASBQwCQ ; 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: smtp36.gate.iad3a.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: 81137768-ea7e-11e9-b70f-525400575b2b-1-1 Received: from [216.105.38.7] ([216.105.38.7:49658] helo=lists.sourceforge.net) by smtp36.gate.iad3a.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 29/8B-06041-394BD9D5; Wed, 09 Oct 2019 06:21:07 -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 1iI94y-0001GE-Md; Wed, 09 Oct 2019 10:20:24 +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 1iI94y-0001G7-1Y for openvpn-devel@lists.sourceforge.net; Wed, 09 Oct 2019 10:20:24 +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:References: In-Reply-To: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:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=nVe5PXuOuU2P81bvH5AhpXpVp22APV3W4FBiSyvKriQ=; b=mDWDFWIakZBSSR84awaQtIU4+i HfHQ1eG3h7ARQkRIhjn9LxSacpJTlMaCrYLyZtKIdA6VhX1BHrsAWKWyretz4WgrUFU0uSAIOp8Oy kk9D8lxlfwgEl2eLTKV2sqXFCzNVaASRC6pQi1oLppDAh2UEDMTcs1ZyunYcfZuVT/HI=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: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:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=nVe5PXuOuU2P81bvH5AhpXpVp22APV3W4FBiSyvKriQ=; b=IzSD/CcllifaOpPZgXYoZZWlqZ ijHjqrvYr5d0So25/z2CC0DE8ntACOVi5/Sxu4C8N+ee/zhGYzArMweWabhyE/UGKST9BC3XAoERG B4+doZ3h2Ef3YwpwcVWy7ayPv6FQiL17Sz3dNtJHX3BvfXSrZuhGa62mTI/YW3wV334c=; 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 1iI94v-00B81y-OC for openvpn-devel@lists.sourceforge.net; Wed, 09 Oct 2019 10:20:23 +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 x999rfYd013645 (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 x999q0U2009386 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 x999q0U4009385 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:52:00 +0200 Message-Id: <20191009095200.9337-2-gert@greenie.muc.de> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191009095200.9337-1-gert@greenie.muc.de> References: <20191009095200.9337-1-gert@greenie.muc.de> 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: 1iI94v-00B81y-OC Subject: [Openvpn-devel] [PATCH 2/2] Fix IPv6 routes on tap interfaces 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 The "route add" code always used "metric 0" on OpenSolaris, because (on tun interfaces) it was required to make the route work on "non-ethernet" interfaces (connected, no NDP). This breaks routes via tap interfaces on recent Solaris versions (tested on OpenIndiana 2019) - there, routes only work if metric is != 0 (or just not set). Otherwise it tries to map the gateway address to a local address and fails. Signed-off-by: Gert Doering Acked-by: Antonio Quartulli --- src/openvpn/route.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openvpn/route.c b/src/openvpn/route.c index 3183fb47..97e90e56 100644 --- a/src/openvpn/route.c +++ b/src/openvpn/route.c @@ -2043,8 +2043,8 @@ add_route_ipv6(struct route_ipv6 *r6, const struct tuntap *tt, r6->netbits, gateway ); - /* on tun/tap, not "elsewhere"? -> metric 0 */ - if (!r6->iface) + /* on tun (not tap), not "elsewhere"? -> metric 0 */ + if (tt->type == DEV_TYPE_TUN && !r6->iface) { argv_printf_cat(&argv, "0"); }