Re: [Openvpn-devel] [PATCH] tun.c: refactor driver detection and make it case-insensitive

2020-02-05 Thread Lev Stipakov
Hi, Indeed, looks much easier to read. Compiled, tested. Acked-by: Lev Stipakov ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel

[Openvpn-devel] [PATCH] wintun: upgrade error message in case of ring registration failure

2020-02-05 Thread Simon Rozman
Rather than have the Interactive Service return a custom 0x2004 (ERROR_REGISTER_RING_BUFFERS) error, return the true GetLastError() code that the TUN_IOCTL_REGISTER_RINGS provides. Signed-off-by: Simon Rozman --- src/openvpn/ring_buffer.h | 2 +- src/openvpn/tun.c | 18

Re: [Openvpn-devel] [PATCH] wintun: check for conflicting options

2020-02-05 Thread Lev Stipakov
Makes sense. Compiled, tested. Acked-by: Lev Stipakov ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Re: [Openvpn-devel] [PATCH] wintun: upgrade error message in case of ring registration failure

2020-02-05 Thread Lev Stipakov
Hi, -msg(M_NONFATAL, "Failed to register ring buffers: %lu", > GetLastError()); > > +switch (GetLastError()) > > +default: > +msg(M_NONFATAL | M_ERRNO, "Failed to register ring > buffers"); > I think it would make sense to print the

Re: [Openvpn-devel] [PATCH] tun.c: uncrustify

2020-02-05 Thread Lev Stipakov
I trust uncrustify to do the right thing :) Compiled, smoke-tested. Note to committer: this patch should be applied before https://patchwork.openvpn.net/patch/978/ (wintun: upgrade error message in case of ring registration failure). Acked-by: Lev Stipakov

[Openvpn-devel] [PATCH] tun.c: refactor driver detection and make it case-insensitive

2020-02-05 Thread Simon Rozman
Hardware IDs are case insensitive on Windows. Furthermore the driver detection logic has been made more explicit and easier to read. Signed-off-by: Simon Rozman --- src/openvpn/tun.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/openvpn/tun.c

[Openvpn-devel] [PATCH applied] Re: Fix linking issues on MinGW

2020-02-05 Thread Gert Doering
Your patch has been applied to the master branch. I have slightly modified the commit message to explain the underlying issue better ("if compiled without -O2"). No change code-wise to your patch. Makes sense :-) commit 5822e52c6b0f86f9e4de946f9fb1374c6fad95f1 Author: Domagoj Pensa Date: Wed

[Openvpn-devel] [PATCH] wintun: check for conflicting options

2020-02-05 Thread Simon Rozman
`--windows-driver wintun` requires `--dev tun`. This is now checked and documented. Signed-off-by: Simon Rozman --- doc/openvpn.8 | 4 src/openvpn/options.c | 7 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/openvpn.8 b/doc/openvpn.8 index

[Openvpn-devel] [PATCH] tun.c: uncrustify

2020-02-05 Thread Simon Rozman
Signed-off-by: Simon Rozman --- src/openvpn/tun.c | 117 +++--- src/openvpn/tun.h | 8 ++-- 2 files changed, 63 insertions(+), 62 deletions(-) diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 070b0fa0..47c3088d 100644 --- a/src/openvpn/tun.c +++

Re: [Openvpn-devel] Fwd: [PATCH 2/2] Fix linking issues on MinGW

2020-02-05 Thread Lev Stipakov
Hi, Good catch. "Inline" generates inline definition and if we don't do inlining (by not specifying O2), linker doesn't see it and prints an error. Apparently MSVC is lax on that. Checking source code, most (if all?) or inline methods are static. Obviously we want our code to compile without

[Openvpn-devel] Summary of the community meeting (5th February 2020)

2020-02-05 Thread Samuli Seppänen
Hi, Here's the summary of the IRC meeting. --- COMMUNITY MEETING Place: #openvpn-meeting on irc.freenode.net Date: Wed 5th February 2020 Time: 11:30 CET (10:30 UTC) Planned meeting topics for this meeting were here: Your local

[Openvpn-devel] [PATCH 0/2] Couple of fixes

2020-02-05 Thread Domagoj Pensa
Hi! First patch fixes long delays when setting IPv4 DNS using netsh without interactive service by adding "validate=no" to netsh invocation. I've noticed that issue while testing wintun, as it is setup using netsh. All other variants, IPv6 DNS without interactive service and IPv4/IPv6 DNS

[Openvpn-devel] [PATCH 1/2] Skip DNS address validation

2020-02-05 Thread Domagoj Pensa
When adding IPv4 DNS servers without interactive service use "validate=no", on Windows 7 and higher, to skip time consuming automatic address validation, that is on by default. Fix uses adapted code from commit 786e06a Signed-off-by: Domagoj Pensa --- src/openvpn/tun.c | 9 + 1 file

[Openvpn-devel] [PATCH 2/2] Fix linking issues on MinGW

2020-02-05 Thread Domagoj Pensa
MinGW linking fails for several files due to a missing "static" declaration in functions tuntap_is_wintun() and tuntap_ring_empty(). Signed-off-by: Domagoj Pensa --- src/openvpn/tun.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openvpn/tun.h b/src/openvpn/tun.h

Re: [Openvpn-devel] [PATCH 2/2] Fix linking issues on MinGW

2020-02-05 Thread Gert Doering
Hi, On Wed, Feb 05, 2020 at 01:46:15PM +0100, Domagoj Pensa wrote: > MinGW linking fails for several files due to a missing "static" > declaration in functions tuntap_is_wintun() and tuntap_ring_empty(). It does not fail for us. So what MinGW version on what OS are you using to exhibit this

Re: [Openvpn-devel] [PATCH 2/2] Fix linking issues on MinGW

2020-02-05 Thread Domagoj Pensa
Hi! On Wed, Feb 05, 2020 at 02:05:11PM +0100, Gert Doering wrote: > Hi, > > On Wed, Feb 05, 2020 at 01:46:15PM +0100, Domagoj Pensa wrote: > > MinGW linking fails for several files due to a missing "static" > > declaration in functions tuntap_is_wintun() and tuntap_ring_empty(). > > It does not

Re: [Openvpn-devel] [PATCH 2/2] Fix linking issues on MinGW

2020-02-05 Thread Domagoj Pensa
Hi! On Wed, Feb 05, 2020 at 02:05:11PM +0100, Gert Doering wrote: > Hi, > > On Wed, Feb 05, 2020 at 01:46:15PM +0100, Domagoj Pensa wrote: > > MinGW linking fails for several files due to a missing "static" > > declaration in functions tuntap_is_wintun() and tuntap_ring_empty(). > > It does not

Re: [Openvpn-devel] Fwd: [PATCH 2/2] Fix linking issues on MinGW

2020-02-05 Thread Domagoj Pensa
Hi, On Wed, Feb 05, 2020 at 10:28:38AM -0500, Selva Nair wrote: > Are you building without optimization? Please try using the latest > openvpn-build (or just add -O2 to complier options). Yes, that was it! When Lev said that he doesn't have problems with build, I've noticed that he is using

Re: [Openvpn-devel] [PATCH 1/2] Skip DNS address validation

2020-02-05 Thread Selva Nair
Hi, On Wed, Feb 5, 2020 at 10:28 AM Lev Stipakov wrote: > > Hi, > > Built and tested with msvc, works as expected - "validate=no" is added to > netsh command line. > > There is a similar commit in Simon's repo (not yet sent to ml) : >

[Openvpn-devel] Fwd: [PATCH 2/2] Fix linking issues on MinGW

2020-02-05 Thread Selva Nair
-- Forwarded message - From: Selva Nair Date: Wed, Feb 5, 2020 at 10:16 AM Subject: Re: [Openvpn-devel] [PATCH 2/2] Fix linking issues on MinGW To: Domagoj Pensa Cc: Gert Doering Hi, On Wed, Feb 5, 2020 at 8:31 AM Domagoj Pensa wrote: > > Hi! > > On Wed, Feb 05, 2020 at

Re: [Openvpn-devel] [PATCH 1/2] Skip DNS address validation

2020-02-05 Thread Lev Stipakov
Hi, Built and tested with msvc, works as expected - "validate=no" is added to netsh command line. There is a similar commit in Simon's repo (not yet sent to ml) : https://github.com/rozmansi/openvpn/commit/6b746cb0bf72a75e9963cc1a037c18cfb856702a I haven't noticed any slowness on my machine,