Re: [Openvpn-devel] [PATCH v3] Use lowest metric interface when multiple interfaces match a route

2018-02-21 Thread Gert Doering
Hi, On Tue, Feb 20, 2018 at 03:35:02PM +0100, Gert Doering wrote: > Jan Just, could you please test the following patch? This will explicitly > clear the host bits for the "on-link" route again. > > Fully untested :-) And indeed, it does not link, because route_ipv6_clear_host_bits() isn't expo

Re: [Openvpn-devel] [PATCH v3] Use lowest metric interface when multiple interfaces match a route

2018-02-20 Thread Gert Doering
Hi, On Fri, Jan 26, 2018 at 10:26:58AM -0500, Selva Nair wrote: > The mystery (at least for me) is where that host part is coming > from... Its zeroed out before setting the route, and I thought the > same (?) route list pointer is > passed in while deleting routes. So. Staring a bit at the cod

Re: [Openvpn-devel] [PATCH v3] Use lowest metric interface when multiple interfaces match a route

2018-01-26 Thread Gert Doering
Hi, On Fri, Jan 26, 2018 at 10:26:58AM -0500, Selva Nair wrote: > The mystery (at least for me) is where that host part is coming > from... Its zeroed out before setting the route, and I thought the > same (?) route list pointer is > passed in while deleting routes. "I seem to remember code chan

Re: [Openvpn-devel] [PATCH v3] Use lowest metric interface when multiple interfaces match a route

2018-01-26 Thread Jan Just Keijser
Hi, On 26/01/18 16:26, Selva Nair wrote: On Fri, Jan 26, 2018 at 10:20 AM, Jan Just Keijser wrote: On 26-Jan-18 16:08, Selva Nair wrote: arrrgh, the important line is missing: ERROR: Windows route add ipv6 command failed: returned error code 1 Gert has explained the fe80::8 magic. Here

Re: [Openvpn-devel] [PATCH v3] Use lowest metric interface when multiple interfaces match a route

2018-01-26 Thread Selva Nair
Hi, On Fri, Jan 26, 2018 at 10:20 AM, Jan Just Keijser wrote: > Hi Selva, > > > > > On 26-Jan-18 16:08, Selva Nair wrote: >> ... >>> arrrgh, the important line is missing: >>> ERROR: Windows route add ipv6 command failed: returned error code 1 >> >> Gert has explained the fe80::8 magic. >> >>

Re: [Openvpn-devel] [PATCH v3] Use lowest metric interface when multiple interfaces match a route

2018-01-26 Thread Jan Just Keijser
Hi Selva, On 26-Jan-18 16:08, Selva Nair wrote: On Fri, Jan 26, 2018 at 8:23 AM, Jan Just Keijser wrote: On 26/01/18 14:11, Jan Just Keijser wrote: the patch works as expected but I did notice something in the openvpn log : Fri Jan 26 14:08:09 2018 do_ifconfig, tt->did_ifconfig_ipv6_setup=

Re: [Openvpn-devel] [PATCH v3] Use lowest metric interface when multiple interfaces match a route

2018-01-26 Thread Selva Nair
Hi, On Fri, Jan 26, 2018 at 8:23 AM, Jan Just Keijser wrote: > On 26/01/18 14:11, Jan Just Keijser wrote: >> >> the patch works as expected but I did notice something in the openvpn log >> : >> >> Fri Jan 26 14:08:09 2018 do_ifconfig, tt->did_ifconfig_ipv6_setup=1 >> Fri Jan 26 14:08:10 2018 NETS

Re: [Openvpn-devel] [PATCH v3] Use lowest metric interface when multiple interfaces match a route

2018-01-26 Thread Gert Doering
Hi, On Fri, Jan 26, 2018 at 02:11:52PM +0100, Jan Just Keijser wrote: > the route was added with the default GW of fe80::8 : should I be worried ? fe80::8 is our/my tun-over-tap hack. On "proper" tun devices, there is no ARP or IPv6 neighbour discovery, so you can point routes toward the *interf

Re: [Openvpn-devel] [PATCH v3] Use lowest metric interface when multiple interfaces match a route

2018-01-26 Thread Jan Just Keijser
On 26/01/18 14:11, Jan Just Keijser wrote: the patch works as expected but I did notice something in the openvpn log : Fri Jan 26 14:08:09 2018 do_ifconfig, tt->did_ifconfig_ipv6_setup=1 Fri Jan 26 14:08:10 2018 NETSH: C:\Windows\system32\netsh.exe interface ipv6 set address interface=17 2001:61

Re: [Openvpn-devel] [PATCH v3] Use lowest metric interface when multiple interfaces match a route

2018-01-26 Thread Jan Just Keijser
the patch works as expected but I did notice something in the openvpn log : Fri Jan 26 14:08:09 2018 do_ifconfig, tt->did_ifconfig_ipv6_setup=1 Fri Jan 26 14:08:10 2018 NETSH: C:\Windows\system32\netsh.exe interface ipv6 set address interface=17 2001:610:120::200:0:1001 store=active Fri Jan 26 1

Re: [Openvpn-devel] [PATCH v3] Use lowest metric interface when multiple interfaces match a route

2018-01-26 Thread Jan Just Keijser
Works as expected. Tested-by: Jan Just Keijser On 24/01/18 18:31, selva.n...@gmail.com wrote: From: Selva Nair Currently a route addition using IPAPI or service is skipped if the route gateway is reachable by multiple interfaces. This changes that to use the interface with lowest metric. Im

[Openvpn-devel] [PATCH v3] Use lowest metric interface when multiple interfaces match a route

2018-01-24 Thread selva . nair
From: Selva Nair Currently a route addition using IPAPI or service is skipped if the route gateway is reachable by multiple interfaces. This changes that to use the interface with lowest metric. Implemented by (i) Do not over-write the return value with TUN_ADAPTER_INDEX_INVALID in windows