From patchwork Wed Nov 27 02:43:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Fasnacht X-Patchwork-Id: 934 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director9.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id UFfhHBOC3l0rdAAAIUCqbw for ; Wed, 27 Nov 2019 09:02:59 -0500 Received: from proxy17.mail.ord1d.rsapps.net ([172.30.191.6]) by director9.mail.ord1d.rsapps.net with LMTP id wBvaHBOC3l1hPgAAalYnBA ; Wed, 27 Nov 2019 09:02:59 -0500 Received: from smtp30.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy17.mail.ord1d.rsapps.net with LMTP id WMJXGhOC3l32PwAAWC7mWg ; Wed, 27 Nov 2019 09:02:59 -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.105.38.7] Authentication-Results: smtp30.gate.ord1d.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; dkim=fail (signature verification failed) header.d=libres.ch; dmarc=fail (p=none; dis=none) header.from=libres.ch X-Suspicious-Flag: YES X-Classification-ID: 9db16a1c-111e-11ea-b81d-5254001e8e38-1-1 Received: from [216.105.38.7] ([216.105.38.7:55804] helo=lists.sourceforge.net) by smtp30.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 57/35-24598-2128EDD5; Wed, 27 Nov 2019 09:02:58 -0500 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 1iZxsv-00023h-CR; Wed, 27 Nov 2019 14:01:37 +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 1iZxss-00022v-A1 for openvpn-devel@lists.sourceforge.net; Wed, 27 Nov 2019 14:01:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:MIME-Version:Message-ID:Subject: Reply-To:Cc:From:To:Date:Sender: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=nbxikVusyVrTCmIR3IKi0cHX8gHic/tPjQWma0gPtTs=; b=OBUYD9q/w/nonpv4pcK8AVzRdN OgSDMf4v0Vler0qGrTPoMDKuR+3IeXT/9vpGZXi3EEXStL7+L/TSLUfkfGxgvaCJf07yQuGCvRocF pW5V6dje2JAVYOMYpPm0vZ4LyFY241o2VtcvbrsbmjA2f1RR977onMeovwSA0E123D74=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:MIME-Version:Message-ID:Subject:Reply-To:Cc:From:To:Date: Sender: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=nbxikVusyVrTCmIR3IKi0cHX8gHic/tPjQWma0gPtTs=; b=d U3XA345KomGoBReTPHOyyodkcPcc63lALgk/ajt5tvZz0ZjHor0nrIZkTtQORWNQf2obuS8KorE1+ bC/9Zpaq4/wQXWIVRr1KL4dentW6VXqGv4eWDUeNKSh1MYc6TDIn3xiHbciHNgulF/3qKoUrhxA25 D2QIN0eQyPKW6aw8=; Received: from mail4.protonmail.ch ([185.70.40.27]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1iZxsm-00F4ox-V9 for openvpn-devel@lists.sourceforge.net; Wed, 27 Nov 2019 14:01:34 +0000 Date: Wed, 27 Nov 2019 13:43:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=libres.ch; s=protonmail; t=1574862220; bh=nbxikVusyVrTCmIR3IKi0cHX8gHic/tPjQWma0gPtTs=; h=Date:To:From:Cc:Reply-To:Subject:Feedback-ID:From; b=RB44Ix+sVZtn4I/TaysNAp4ErOUyyYsw36a5QpZ0LAX8AWUG6SJgUO0QsDtmRzK8U 6Q072DvrWfi5c5LZfaNBA3mo+FFkuZqCMhoQ9JOe4eyuaszBokpnxPRtA5hvlLOo2v 9uMUmnKtHc/E0OuNr3lX9+VM+XaEHQtG6C7aHJrw= To: openvpn-devel@lists.sourceforge.net From: Laurent Fasnacht Message-ID: <20191127134258.9162-1-l@libres.ch> Feedback-ID: 57pQRvny2FQmWgLHJJAbxKAKqQBFnNNx81A6cwIljfp_GXmFnS-7GQgfTdz7uWKbCUkx1vWr55f9BuhCrwWL9w==:Ext:ProtonMail MIME-Version: 1.0 X-Spam-Status: No, score=-1.2 required=7.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.protonmail.ch X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 1.0 MIME_NO_TEXT No (properly identified) text body parts X-Headers-End: 1iZxsm-00F4ox-V9 Subject: [Openvpn-devel] [PATCH] Fix IPv6 configuration on Windows using netsh 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: , Reply-To: Laurent Fasnacht Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox Apparently, `netsh interface ipv6 set address ...` defaults to using a subnet of /64, and therefore adds an onlink route of that size. When using a tun tunnel, the tap adapter only replies to neighbor discovery packets for fe80::8. This leads to the unfortunate situation where all the hosts in the /64 are not reachable. This patch fixes that situation by specifying a /128 netmask, as the real route is added afterwards, via the gateway. --- src/openvpn/tun.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 599fd817..8b054c80 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -982,15 +982,15 @@ do_ifconfig_ipv6(struct tuntap *tt, const char *ifname, int tun_mtu, else { /* example: netsh interface ipv6 set address interface=42 - * 2001:608:8003::d store=active + * 2001:608:8003::d/128 store=active */ char iface[64]; openvpn_snprintf(iface, sizeof(iface), "interface=%lu", tt->adapter_index); - argv_printf(&argv, "%s%sc interface ipv6 set address %s %s store=active", + argv_printf(&argv, "%s%sc interface ipv6 set address %s %s/%d store=active", get_win_sys_path(), NETSH_PATH_SUFFIX, iface, - ifconfig_ipv6_local); + ifconfig_ipv6_local, 128); netsh_command(&argv, 4, M_FATAL); /* set ipv6 dns servers if any are specified */ netsh_set_dns6_servers(tt->options.dns6, tt->options.dns6_len, ifname);