Re: [Openvpn-devel] [PATCH] Allow --dhcp-option in config file when windows-driver is wintun

2020-09-14 Thread Lev Stipakov
Hi, > -msg(M_USAGE, "--dhcp-options requires --ip-win32 dynamic or > adaptive"); > +msg(M_USAGE, "--dhcp-option requires --ip-win32 dynamic or > adaptive"); Nice, this typo has been there since at least 2005. It looks like that warning is not quite correct - for example, DNS ca

[Openvpn-devel] [PATCH] Allow --dhcp-option in config file when windows-driver is wintun

2020-09-14 Thread selva . nair
From: Selva Nair When wintun is in use we mutate ip_win32_type to NETSH and then complain that ip-win32 option should be dynamic or adaptive if any --dhcp-option directive is present in the config file. This causes a fatal error. How to reproduce: specify a --dhcp-option in the config and change

[Openvpn-devel] [PATCH] Fix netbits setting (in TAP mode) for IPv6 on Windows.

2020-09-14 Thread Gert Doering
For TUN interfaces, the IPv6 address needs to be configured with "address/128" and a local subnet route is needed, pointing to our fake gateway fe80::8. There is no ethernet headers or ND outside the tun/tap interface, so anything but fe80::8 is not resolvable. For TAP interfaces, the proper subn

[Openvpn-devel] [PATCH v4] Add DNS SRV remote host discovery support

2020-09-14 Thread Vladislav Grishenko
DNS SRV remote host discovery allows to have multiple OpenVPN servers for a single domain w/o explicit profile enumeration, to move services from host to host with little fuss, and to designate hosts as primary servers for a service and others as backups. Feature has been asked several times alread

Re: [Openvpn-devel] [PATCH] Fix IPv6 configuration on Windows using netsh

2020-09-14 Thread Gert Doering
Hi, On Wed, Nov 27, 2019 at 01:43:38PM +, Laurent Fasnacht wrote: > 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 packet

[Openvpn-devel] [PATCH v2] sample-plugins: Partially autotoolize the sample-plugins build

2020-09-14 Thread David Sommerseth
The sample-plugins have their own set of build/winbuild scripts in each of these plugin directories. This does not give a good way to reuse various macros the autoconf/automake/configure process enables; which can contain important macros to make some code build without errors or warnings. Normal

[Openvpn-devel] [PATCH] sample-plugins: Partially autotoolize the sample-plugins build

2020-09-14 Thread David Sommerseth
The sample-plugins have their own set of build/winbuild scripts in each of these plugin directories. This does not give a good way to reuse various macros the autoconf/automake/configure process enables; which can contain important macros to make some code build without errors or warnings. Normal

[Openvpn-devel] [PATCH applied] Re: man: Improve --remote entry

2020-09-14 Thread Gert Doering
Acked-by: Gert Doering I've compared this to the 2.4 man page, and it is indeed easier to read and less unclear this way. As written already, one day we need to go through the man pages and throw out all NOTEs that refer to --secret mode, or clarify what "running without --remote" really means..

Re: [Openvpn-devel] [PATCH] man: Improve --remote entry

2020-09-14 Thread Gert Doering
Hi, On Wed, Sep 09, 2020 at 08:30:12PM +0200, David Sommerseth wrote: > + *Note:* > + Since UDP is connectionless, connection failure is defined by > + the ``--ping`` and ``--ping-restart`` options. While this is what the openvpn.8 man page used to say, it's technically only valid for so

[Openvpn-devel] [PATCH applied] Re: socks.c: fix alen for DOMAIN type addresses, bump up buffer sizes

2020-09-14 Thread Gert Doering
Thanks for the review. Patch has been applied to many branches (bugfix)... commit eebeaa02367d247fc2549df3edf8e598c58c3572 (master) commit c7f0d7b95bff05b0a5ddab15318cd53fcc91d60a (release/2.5) commit 64a76533b676ad441ca20bab0c8b2e387bd56ebe (release/2.4) Author: Gert Doering Date: Wed Sep 9 14

Re: [Openvpn-devel] [PATCH v2] Add demo plugin that excercises "CLIENT_CONNECT" and "CLIENT_CONNECT_V2" paths

2020-09-14 Thread David Sommerseth
On 11/09/2020 23:39, Gert Doering wrote: [...snip...] >> I'm getting a lot of "warning: implicit declaration of function >> ???strdup???;" and >> "warning: assignment to ???char *??? from ???int??? makes pointer from >> integer >> without a cast" compiler warning on all of these strdup() calls.

Re: [Openvpn-devel] [PATCH v3] socks.c: fix alen for DOMAIN type addresses, bump up buffer sizes

2020-09-14 Thread Antonio Quartulli
Hi, On 14/09/2020 11:04, Antonio Quartulli wrote: > Hi, > > On 09/09/2020 14:22, Gert Doering wrote: >> When a SOCKS5 server sends back a reply, it encodes an "address", >> which can be IPv4 (4 bytes), IPv6 (16 bytes) or "a domain name", >> which has a lenght (1 byte) and "a string of length " -

[Openvpn-devel] [PATCH applied] Re: msvc: better support for 32bit architecture

2020-09-14 Thread Gert Doering
Acked-by: Gert Doering I won't claim to understand all the intricacies, but the change looks like it would do what the text says - and you're the MSVC master anyway. Your patch has been applied to the master and release/2.5 branch. commit fb94fbc31f9d6e434af465bf8a345763f89fddc9 (master) commit

Re: [Openvpn-devel] [PATCH] If IPv6 pool specification sets pool start to ::0 address, increment.

2020-09-14 Thread Gert Doering
Hi, On Mon, Sep 14, 2020 at 10:56:59AM +0200, Antonio Quartulli wrote: > > pool->ipv6.base = ipv6_base; > > + > > +/* if a pool starts at ::0, that first IPv6 address is not usable > > + * first clients (subnet anycast address). Start with 1, then. > > + * NOTE: t

Re: [Openvpn-devel] [PATCH v3] socks.c: fix alen for DOMAIN type addresses, bump up buffer sizes

2020-09-14 Thread Antonio Quartulli
Hi, On 09/09/2020 14:22, Gert Doering wrote: > When a SOCKS5 server sends back a reply, it encodes an "address", > which can be IPv4 (4 bytes), IPv6 (16 bytes) or "a domain name", > which has a lenght (1 byte) and "a string of length " - so > when copying bytes, we need to hande "length +1" bytes.

Re: [Openvpn-devel] [PATCH] If IPv6 pool specification sets pool start to ::0 address, increment.

2020-09-14 Thread Antonio Quartulli
Hi, On 11/09/2020 13:59, Gert Doering wrote: > index 1f74ac57..2814ff46 100644 > --- a/src/openvpn/pool.c > +++ b/src/openvpn/pool.c > @@ -224,6 +224,21 @@ ifconfig_pool_init(const bool ipv4_pool, enum pool_type > type, in_addr_t start, > } > > pool->ipv6.base = ipv6_base; > +

[Openvpn-devel] [PATCH] msvc: better support for 32bit architecture

2020-09-14 Thread Lev Stipakov
From: Lev Stipakov Previously dependency directory was hardcoded to ..\openvpn-build\msvc\image which means that to build for 32bit architecture, one needs to rebuild dependencies and do the same again for 64bit architecture. Add architecture's "bitness" to dependency directory. As a bonus, a

[Openvpn-devel] [PATCH applied] Re: Fix --show-gateway for IPv6 on NetBSD/i386.

2020-09-14 Thread Gert Doering
Patch has been applied to many branches... (bugfix). commit 37aab49b083a9e385970e3ab2dd727ea1a95ff35 (master) commit 9a695902402faafa343783c38761c4c0ccbb2b83 (HEAD -> release/2.5) commit 9e9fd488d7d939ac9992f8bd4c7394a39b73d7e4 (HEAD -> release/2.4) Author: Gert Doering Date: Sun Sep 13 16:56:21

Re: [Openvpn-devel] [PATCH v3] socks.c: fix alen for DOMAIN type addresses, bump up buffer sizes

2020-09-14 Thread Antonio Quartulli
Hi, On 09/09/2020 14:22, Gert Doering wrote: > diff --git a/src/openvpn/socks.c b/src/openvpn/socks.c > index 57f0cee2..d43d84a8 100644 > --- a/src/openvpn/socks.c > +++ b/src/openvpn/socks.c > @@ -312,7 +312,7 @@ recv_socks_reply(socket_descriptor_t sd, > char atyp = '\0'; > int alen =

[Openvpn-devel] [PATCH] Fix combination of --dev tap and --topology subnet across multiple platforms.

2020-09-14 Thread Gert Doering
--topology should have no effect in tap mode (tap is always "subnet"), but due to the way options are checked, setting "topology subnet" caught an improper branch on all non-linux and non-win32 platforms. Easily tested by adding "--topology subnet" to a "--dev tap" t_client test. Tested, verified