| Message ID | 1515482173-29447-1-git-send-email-eyal.birger@gmail.com |
|---|---|
| State | Rejected, archived |
| Headers |
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net> Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director2.mail.ord1d.rsapps.net ([172.30.191.6]) by backend31.mail.ord1d.rsapps.net (Dovecot) with LMTP id G1W8NYJsVFoGWwAAgoeIoA for <patchwork@openvpn.net>; Tue, 09 Jan 2018 02:17:22 -0500 Received: from proxy19.mail.ord1d.rsapps.net ([172.30.191.6]) by director2.mail.ord1d.rsapps.net (Dovecot) with LMTP id C/mvNYJsVFrWTQAAgYhSiA ; Tue, 09 Jan 2018 02:17:22 -0500 Received: from smtp31.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy19.mail.ord1d.rsapps.net (Dovecot) with LMTP id andLNIJsVFofXQAAyH2SIw ; Tue, 09 Jan 2018 02:17:22 -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: smtp31.gate.ord1d.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; dkim=fail (signature verification failed) header.d=gmail.com; dmarc=fail (p=none; dis=none) header.from=gmail.com X-Classification-ID: 22d9e3b6-f50d-11e7-9209-525400b3ac8c-1-1 Received: from [216.34.181.88] ([216.34.181.88:26459] helo=lists.sourceforge.net) by smtp31.gate.ord1d.rsapps.net (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) (ecelerity 4.2.1.56364 r(Core:4.2.1.14)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 27/85-13117-28C645A5; Tue, 09 Jan 2018 02:17:22 -0500 Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.89) (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) id 1eYo94-0005Tj-KH; Tue, 09 Jan 2018 07:16:26 +0000 Received: from sfi-mx-4.v28.ch3.sourceforge.com ([172.29.28.194] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from <eyal.birger@gmail.com>) id 1eYo93-0005Tb-EO for openvpn-devel@lists.sourceforge.net; Tue, 09 Jan 2018 07:16:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: MIME-Version:Content-Type: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=Jp1Sq874jz4TiDMK0twUdjxrcYzsDbtKAejjTON77rY=; b=WvdbYt1u8bb3Y5lnr2BVMFnMEi LxubQ4F11wee/rE32TVuFo1LpnBylx61Cju+16P+chBKkc76aWJswRVy679dyrjxqjYYLVxF0kQok 6ghzXNAPNSMg6coe2u7PKXMfL+g+cmCkRbkQ3YickZ3YRT7bdFSKT3URpWj6o44R4dlI=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version: Content-Type: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=Jp1Sq874jz4TiDMK0twUdjxrcYzsDbtKAejjTON77rY=; b=ZF360dPqhGiMIySLzFyntV0upf k2LcmwKlTVifZgtgTKu2hanHrVM5p3qlgH3iK2RTpCLz8w4IoSP22hFp1fUAmlVIuCsSvm6WGV6q0 Hk/j6yfapwWtSDCPqtNYGgmf5uNa3fOETFMAS7+PQNjo0trgCZRA4Ifx8mGRlHoc5uc4=; Received: from mail-wm0-f67.google.com ([74.125.82.67]) by sfi-mx-4.v28.ch3.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89) id 1eYo92-0003f7-KI for openvpn-devel@lists.sourceforge.net; Tue, 09 Jan 2018 07:16:25 +0000 Received: by mail-wm0-f67.google.com with SMTP id f140so18498225wmd.2 for <openvpn-devel@lists.sourceforge.net>; Mon, 08 Jan 2018 23:16:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Jp1Sq874jz4TiDMK0twUdjxrcYzsDbtKAejjTON77rY=; b=PHqXmRiI5IeVZJOA5bPw62EfGSnmmK5H/a/cRP2EA8XtzG6yTnRJFmIP84Q/Kqp4Y/ 9nUecpoYOiu5oelZ9hMQdluGsH9cAlRWo4e42njhG7NoE6ObaLfGuE6AcwvhCjfJu/fF f3CrjMKjhvAdRmg2lYpomQtHLShAofbHgNgesDuqkzFaasmpKUTZckTNzeg3gTKGLpfs 5mC10ZUWs/2Xrh0GbH7UE5oQ7k6P93LcPOFTh2vocxCGiFDzbvI5mhal3Ykj7NGEZ0Ms 6aDYzX8pQgH/M8mXtkBg+XxsFO5i2wJFDoPewLYOx3hmBFSrdXKKNbVfynHHG9Z4arIs e+1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Jp1Sq874jz4TiDMK0twUdjxrcYzsDbtKAejjTON77rY=; b=hZuuGDE1NuWa8oljnKA9WxrJymwMSlHlJn6RIrGtNeXfRStMxqhyY93wLe3OQwHFxW mBpChBFaFA93BfdMgAwnmMaNnvpej330TlkjLfg93Skl1LnhDeUakF+yTkZ60SvBrVdq VVfNu5HuZMnscsTU32L76YjwMIDx59SdZP85heZfc5PEHGwEXyIaXF1LVMzybDcyVakj K2am4SczzOH6KjWHLUsKLfACAo5eTKi9c4nEdu30I2GDUdlypsR8tveEEICvVbhp4UxL y/w+H5q7dn342p7ZYlo4lMVuzEGgWYsbsQu33bMaOMUwELqa6Z09/VTBcNF4wzAfG6r1 lyXg== X-Gm-Message-State: AKGB3mKu2YR+E7AQGxdEm32Zp3m7nkKiiQfOiPmS/kmuqbVh6CTSDALd trC3N43LhI5zKaK4X7RHLLjzgLNT X-Google-Smtp-Source: ACJfBov9zAxjEgJWbANbAgkrOSkiIf2bXALbpaSQwvcbqERlcVp+urzMUq7UWVZOBH9h1pcih+lpTQ== X-Received: by 10.28.211.75 with SMTP id k72mr11815197wmg.39.1515482178250; Mon, 08 Jan 2018 23:16:18 -0800 (PST) Received: from localhost.localdomain ([2001:4cd0:bc00:1c00:6d2c:dc0b:8e78:1b32]) by smtp.gmail.com with ESMTPSA id x75sm14925470wme.44.2018.01.08.23.16.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Jan 2018 23:16:17 -0800 (PST) From: Eyal Birger <eyal.birger@gmail.com> To: openvpn-devel@lists.sourceforge.net Date: Tue, 9 Jan 2018 09:16:13 +0200 Message-Id: <1515482173-29447-1-git-send-email-eyal.birger@gmail.com> X-Mailer: git-send-email 2.7.4 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (eyal.birger[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [74.125.82.67 listed in list.dnswl.org] -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_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1eYo92-0003f7-KI Subject: [Openvpn-devel] [PATCH] Windows: Set interface IPv6 prefix length when configuring address X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: <openvpn-devel.lists.sourceforge.net> List-Unsubscribe: <https://lists.sourceforge.net/lists/options/openvpn-devel>, <mailto:openvpn-devel-request@lists.sourceforge.net?subject=unsubscribe> List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=openvpn-devel> List-Post: <mailto:openvpn-devel@lists.sourceforge.net> List-Help: <mailto:openvpn-devel-request@lists.sourceforge.net?subject=help> List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/openvpn-devel>, <mailto:openvpn-devel-request@lists.sourceforge.net?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox |
| Series |
[Openvpn-devel] Windows: Set interface IPv6 prefix length when configuring address
|
|
Commit Message
Eyal Birger
Jan. 8, 2018, 8:16 p.m. UTC
Address prefix length defaults to /64 on Windows. This change allows using
Windows clients in setups that use a different prefix length.
Note: the ability to set the prefix length is documented in the netsh
'add address' command, but works on the 'set address' command as well.
Signed-off-by: Eyal Birger <eyal.birger@gmail.com>
---
src/openvpn/tun.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
Comments
Hi, I'm on a reviewing spree (doing my penance), so here goes.. Thanks for the patch On Tue, Jan 9, 2018 at 2:16 AM, Eyal Birger <eyal.birger@gmail.com> wrote: > Address prefix length defaults to /64 on Windows. This change allows using > Windows clients in setups that use a different prefix length. > > Note: the ability to set the prefix length is documented in the netsh > 'add address' command, but works on the 'set address' command as well. Aside: If interactive service is in use, the ip helper API is used and setting prefix already works. Ideally I would like to see openvpn on Windows used only with the interactive service, but we are not there yet -- instances started by the automatic service does not use it and there are some users still running the GUI as admin for some inexplicable reasons. So we need to continue supporting these code paths. > > Signed-off-by: Eyal Birger <eyal.birger@gmail.com> > --- > src/openvpn/tun.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c > index 25831ce..b2b4795 100644 > --- a/src/openvpn/tun.c > +++ b/src/openvpn/tun.c > @@ -1561,15 +1561,16 @@ do_ifconfig(struct tuntap *tt, > } > else > { > - /* example: netsh interface ipv6 set address interface=42 2001:608:8003::d store=active */ > + /* example: netsh interface ipv6 set address interface=42 2001:608:8003::d/64 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", > + "%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, > + tt->netbits_ipv6); > 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, actual); Works as expected and the code is good. Currently, on setting the address, a default route gets set with prefix /64 with gateway as OnLink (does not happen when iphelper api is used). Although our explicit route to fe80::8 may override it, it looks better to set the correct prefix in the address. So: Acked-by: Selva Nair <selva.nair@gmail.com> Selva P.S. While going through this I noticed a bug in our route deletion code for ipv6: only when using netsh (not the interactiveservice), so gone unnoticed. Will report separately. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Hi, Going through patchworks noticed this. Thankfully this never got committed so here goes a retraction. On Sun, Jan 21, 2018 at 1:45 PM Selva Nair <selva.nair@gmail.com> wrote: > Hi, > > I'm on a reviewing spree (doing my penance), so here goes.. > > Thanks for the patch > > On Tue, Jan 9, 2018 at 2:16 AM, Eyal Birger <eyal.birger@gmail.com> wrote: > > Address prefix length defaults to /64 on Windows. This change allows > using > > Windows clients in setups that use a different prefix length. > > > > Note: the ability to set the prefix length is documented in the netsh > > 'add address' command, but works on the 'set address' command as well. > > Aside: > If interactive service is in use, the ip helper API is used and setting > prefix already works. Ideally I would like to see openvpn on Windows > used only with the interactive service, but we are not there yet -- > instances started by the automatic service does not use it and there > are some users still running the GUI as admin for some inexplicable > reasons. > > So we need to continue supporting these code paths. > > > > > Signed-off-by: Eyal Birger <eyal.birger@gmail.com> > > --- > > src/openvpn/tun.c | 7 ++++--- > > 1 file changed, 4 insertions(+), 3 deletions(-) > > > > diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c > > index 25831ce..b2b4795 100644 > > --- a/src/openvpn/tun.c > > +++ b/src/openvpn/tun.c > > @@ -1561,15 +1561,16 @@ do_ifconfig(struct tuntap *tt, > > } > > else > > { > > - /* example: netsh interface ipv6 set address > interface=42 2001:608:8003::d store=active */ > > + /* example: netsh interface ipv6 set address > interface=42 2001:608:8003::d/64 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", > > + "%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, > > + tt->netbits_ipv6); > > 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, actual); > > Works as expected and the code is good. > > Currently, on setting the address, a default route gets set with > prefix /64 with gateway as OnLink (does not happen when iphelper api > is used). Although our explicit route to fe80::8 may override it, it > looks better to set the correct prefix in the address. So: > > Acked-by: Selva Nair <selva.nair@gmail.com> > Though this works in my tests I want to retract this ACK. Apart from possible issues due to the appearance of the onlink route in some cases, I think the correct approach going forward is to stop using netsh and use the IP helper API for such tasks. And do it in the same way as done using the service. Un-Acked-by: Selva Nair <selva.nair@gmail.com> :) Selva <div dir="ltr"><div>Hi,<br><br></div><div>Going through patchworks noticed this.<br><br></div>Thankfully this never got committed so here goes a retraction.<br><div><div><br><div class="gmail_quote"><div dir="ltr">On Sun, Jan 21, 2018 at 1:45 PM Selva Nair <<a href="mailto:selva.nair@gmail.com">selva.nair@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br> <br> I'm on a reviewing spree (doing my penance), so here goes..<br> <br> Thanks for the patch<br> <br> On Tue, Jan 9, 2018 at 2:16 AM, Eyal Birger <<a href="mailto:eyal.birger@gmail.com" target="_blank">eyal.birger@gmail.com</a>> wrote:<br> > Address prefix length defaults to /64 on Windows. This change allows using<br> > Windows clients in setups that use a different prefix length.<br> ><br> > Note: the ability to set the prefix length is documented in the netsh<br> > 'add address' command, but works on the 'set address' command as well.<br> <br> Aside:<br> If interactive service is in use, the ip helper API is used and setting<br> prefix already works. Ideally I would like to see openvpn on Windows<br> used only with the interactive service, but we are not there yet --<br> instances started by the automatic service does not use it and there<br> are some users still running the GUI as admin for some inexplicable<br> reasons.<br> <br> So we need to continue supporting these code paths.<br> <br> ><br> > Signed-off-by: Eyal Birger <<a href="mailto:eyal.birger@gmail.com" target="_blank">eyal.birger@gmail.com</a>><br> > ---<br> > src/openvpn/tun.c | 7 ++++---<br> > 1 file changed, 4 insertions(+), 3 deletions(-)<br> ><br> > diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c<br> > index 25831ce..b2b4795 100644<br> > --- a/src/openvpn/tun.c<br> > +++ b/src/openvpn/tun.c<br> > @@ -1561,15 +1561,16 @@ do_ifconfig(struct tuntap *tt,<br> > }<br> > else<br> > {<br> > - /* example: netsh interface ipv6 set address interface=42 2001:608:8003::d store=active */<br> > + /* example: netsh interface ipv6 set address interface=42 2001:608:8003::d/64 store=active */<br> > char iface[64];<br> > openvpn_snprintf(iface, sizeof(iface), "interface=%lu", tt->adapter_index );<br> > argv_printf(&argv,<br> > - "%s%sc interface ipv6 set address %s %s store=active",<br> > + "%s%sc interface ipv6 set address %s %s/%d store=active",<br> > get_win_sys_path(),<br> > NETSH_PATH_SUFFIX,<br> > iface,<br> > - ifconfig_ipv6_local );<br> > + ifconfig_ipv6_local,<br> > + tt->netbits_ipv6);<br> > netsh_command(&argv, 4, M_FATAL);<br> > /* set ipv6 dns servers if any are specified */<br> > netsh_set_dns6_servers(tt->options.dns6, tt->options.dns6_len, actual);<br> <br> Works as expected and the code is good.<br> <br> Currently, on setting the address, a default route gets set with<br> prefix /64 with gateway as OnLink (does not happen when iphelper api<br> is used). Although our explicit route to fe80::8 may override it, it<br> looks better to set the correct prefix in the address. So:<br> <br> Acked-by: Selva Nair <<a href="mailto:selva.nair@gmail.com" target="_blank">selva.nair@gmail.com</a>><br></blockquote><div><br></div><div>Though this works in my tests I want to retract this ACK.<br><br>Apart from possible issues due to the appearance of the onlink route in some cases, I think the correct approach going forward is to stop using netsh and use the IP helper API for such tasks. And do it in the same way as done using the service. <br><br></div><div>Un-Acked-by: Selva Nair <<a href="mailto:selva.nair@gmail.com">selva.nair@gmail.com</a>> :)<br><br></div><div>Selva<br></div></div></div></div></div>
On 16/10/18 23:48, Selva Nair wrote: > Hi, > > Going through patchworks noticed this. > > Thankfully this never got committed so here goes a retraction. > > On Sun, Jan 21, 2018 at 1:45 PM Selva Nair <selva.nair@gmail.com > <mailto:selva.nair@gmail.com>> wrote: > > Hi, > > I'm on a reviewing spree (doing my penance), so here goes.. > > Thanks for the patch > > On Tue, Jan 9, 2018 at 2:16 AM, Eyal Birger <eyal.birger@gmail.com > <mailto:eyal.birger@gmail.com>> wrote: > > Address prefix length defaults to /64 on Windows. This change allows using > > Windows clients in setups that use a different prefix length. > > > > Note: the ability to set the prefix length is documented in the netsh > > 'add address' command, but works on the 'set address' command as well. > > Aside: > If interactive service is in use, the ip helper API is used and setting > prefix already works. Ideally I would like to see openvpn on Windows > used only with the interactive service, but we are not there yet -- > instances started by the automatic service does not use it and there > are some users still running the GUI as admin for some inexplicable > reasons. > > So we need to continue supporting these code paths. > > > > > Signed-off-by: Eyal Birger <eyal.birger@gmail.com > <mailto:eyal.birger@gmail.com>> > > --- > > src/openvpn/tun.c | 7 ++++--- > > 1 file changed, 4 insertions(+), 3 deletions(-) > > > > diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c > > index 25831ce..b2b4795 100644 > > --- a/src/openvpn/tun.c > > +++ b/src/openvpn/tun.c > > @@ -1561,15 +1561,16 @@ do_ifconfig(struct tuntap *tt, > > } > > else > > { > > - /* example: netsh interface ipv6 set address > interface=42 2001:608:8003::d store=active */ > > + /* example: netsh interface ipv6 set address > interface=42 2001:608:8003::d/64 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", > > + "%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, > > + tt->netbits_ipv6); > > 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, actual); > > Works as expected and the code is good. > > Currently, on setting the address, a default route gets set with > prefix /64 with gateway as OnLink (does not happen when iphelper api > is used). Although our explicit route to fe80::8 may override it, it > looks better to set the correct prefix in the address. So: > > Acked-by: Selva Nair <selva.nair@gmail.com <mailto:selva.nair@gmail.com>> > > > Though this works in my tests I want to retract this ACK. > > Apart from possible issues due to the appearance of the onlink route in some > cases, I think the correct approach going forward is to stop using netsh and > use the IP helper API for such tasks. And do it in the same way as done using > the service. > > Un-Acked-by: Selva Nair <selva.nair@gmail.com <mailto:selva.nair@gmail.com>> :) That was close .... I looked at this yesterday, but since the contributor was a new person and changing details in code paths I'm not that deep into, I wanted to have a much closer look before applying it - luckily I didn't have enough brainpower yesterday to dive into this one. And since you had ACKed it, I considered it generally being safe enough for further processing. So thanks for having a closer look again and notify us instantly :) I'll ensure this patch is tagged as rejected in patchwork.
Hi, On Tue, Oct 16, 2018 at 05:48:29PM -0400, Selva Nair wrote: > Going through patchworks noticed this. > > Thankfully this never got committed so here goes a retraction. > > On Sun, Jan 21, 2018 at 1:45 PM Selva Nair <selva.nair@gmail.com> wrote: > > > Hi, > > > > I'm on a reviewing spree (doing my penance), so here goes.. > > > > Thanks for the patch > > > > On Tue, Jan 9, 2018 at 2:16 AM, Eyal Birger <eyal.birger@gmail.com> wrote: > > > Address prefix length defaults to /64 on Windows. This change allows > > using > > > Windows clients in setups that use a different prefix length. I had this on "I need to do more testing with this", which is why it never proceeded - there might be unintended side effects, so I wanted to do more detailed testing with "netsh" and with "iservice" backends, and different prefix lengths etc. Also, I had the suspicion that if we actually set a prefix length, it will lead to local ND traffic which the tap driver won't answer (it will only answer fe80::8) thus causing a "black hole route" for the tap subnet... [..] > Though this works in my tests I want to retract this ACK. > > Apart from possible issues due to the appearance of the onlink route in > some cases, I think the correct approach going forward is to stop using > netsh and use the IP helper API for such tasks. And do it in the same way > as done using the service. > > Un-Acked-by: Selva Nair <selva.nair@gmail.com> :) Thanks :-) We'll definitely need to look into this more closely. gert
Hi, On Wed, Oct 17, 2018 at 8:07 AM Gert Doering <gert@greenie.muc.de> wrote: > Hi, > > On Tue, Oct 16, 2018 at 05:48:29PM -0400, Selva Nair wrote: > > Going through patchworks noticed this. > > > > Thankfully this never got committed so here goes a retraction. > > > > On Sun, Jan 21, 2018 at 1:45 PM Selva Nair <selva.nair@gmail.com> wrote: > > > > > Hi, > > > > > > I'm on a reviewing spree (doing my penance), so here goes.. > > > > > > Thanks for the patch > > > > > > On Tue, Jan 9, 2018 at 2:16 AM, Eyal Birger <eyal.birger@gmail.com> > wrote: > > > > Address prefix length defaults to /64 on Windows. This change allows > > > using > > > > Windows clients in setups that use a different prefix length. > > I had this on "I need to do more testing with this", which is why it > never proceeded - there might be unintended side effects, so I wanted > to do more detailed testing with "netsh" and with "iservice" backends, > and different prefix lengths etc. > > Also, I had the suspicion that if we actually set a prefix length, it > will lead to local ND traffic which the tap driver won't answer (it > will only answer fe80::8) thus causing a "black hole route" for the > tap subnet... > Aha, that explains why it lingered in that state for long :) However, we do currently set the prefix-length while using the service (that->netbits_ipv6 is passed as prefix_len to the ip helper API), don't we? Selva <div dir="ltr"><div dir="ltr">Hi,<br><div><br><div class="gmail_quote"><div dir="ltr">On Wed, Oct 17, 2018 at 8:07 AM Gert Doering <<a href="mailto:gert@greenie.muc.de" target="_blank">gert@greenie.muc.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br> <br> On Tue, Oct 16, 2018 at 05:48:29PM -0400, Selva Nair wrote:<br> > Going through patchworks noticed this.<br> > <br> > Thankfully this never got committed so here goes a retraction.<br> > <br> > On Sun, Jan 21, 2018 at 1:45 PM Selva Nair <<a href="mailto:selva.nair@gmail.com" target="_blank">selva.nair@gmail.com</a>> wrote:<br> > <br> > > Hi,<br> > ><br> > > I'm on a reviewing spree (doing my penance), so here goes..<br> > ><br> > > Thanks for the patch<br> > ><br> > > On Tue, Jan 9, 2018 at 2:16 AM, Eyal Birger <<a href="mailto:eyal.birger@gmail.com" target="_blank">eyal.birger@gmail.com</a>> wrote:<br> > > > Address prefix length defaults to /64 on Windows. This change allows<br> > > using<br> > > > Windows clients in setups that use a different prefix length.<br> <br> I had this on "I need to do more testing with this", which is why it<br> never proceeded - there might be unintended side effects, so I wanted<br> to do more detailed testing with "netsh" and with "iservice" backends,<br> and different prefix lengths etc.<br> <br> Also, I had the suspicion that if we actually set a prefix length, it<br> will lead to local ND traffic which the tap driver won't answer (it<br> will only answer fe80::8) thus causing a "black hole route" for the<br> tap subnet...<br></blockquote><div><br></div><div>Aha, that explains why it lingered in that state for long :)<br><br></div><div>However, we do currently set the prefix-length while using the<br></div><div>service (that->netbits_ipv6 is passed as prefix_len to the ip helper API),<br>don't we? <br><br></div><div>Selva<br></div></div></div></div></div>
diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 25831ce..b2b4795 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -1561,15 +1561,16 @@ do_ifconfig(struct tuntap *tt, } else { - /* example: netsh interface ipv6 set address interface=42 2001:608:8003::d store=active */ + /* example: netsh interface ipv6 set address interface=42 2001:608:8003::d/64 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", + "%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, + tt->netbits_ipv6); 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, actual);