Hi,
And the rationale for the patch:
On Mon, Jul 17, 2017 at 8:22 AM, Jan Just Keijser <janj...@nikhef.nl> wrote:
> On 17/07/17 14:14, Gert Doering wrote:
>
>> Hi,
>>
>> On Mon, Jul 17, 2017 at 02:10:11PM +0200, Jan Just Keijser wrote:
>>
>>> this problem is NOT present in OpenVPN 2.3.17; the same warning appears
>>> (route gateway is ambiguous) but the route is added
>>> anyway. This seems to be a regression in 2.4.
>>>
>> Can we have a log, please?
>>
>>
>> attached: config and log (with hostnames anonymized)
As in the logs,
Mon Jul 17 14:18:43 2017 us=1227 C:\Windows\system32\route.exe ADD
222.222.97.13 MASK 255.255.255.255 111.111.135.254
Mon Jul 17 14:18:43 2017 us=1227 Warning: route gateway is ambiguous:
111.111.135.254 (2 matches)
when multiple interfaces match a route, we bail out with a warning unless
the route method used is exe. This code is the same in 2.3.17 and 2.4.3
except the latter defaults to using IPAPI invoked via the service. 2.3.7
also defaults to IPAPI but falls back to exe if the former fails.
Looking the sources: In tun.c
adapter_index_of_ip() returns the index of the first matching adapter and
the number of matching adapters found. If the count is > 1
windows_route_find_if_index() in route.c sets the index to
TUN_ADAPTER_INDEX_INVALID and route addition gets aborted.
We could slightly modify adapter_index_of_ip() to return the matching index
with smallest metric when more than one are found.
Selva
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel