[Openvpn-devel] [PATCH] Set o->use_peer_id flag for p2p mode

2022-05-24 Thread Lev Stipakov
From: Lev Stipakov There are two flags to indicate peer-id usage, one is in tls_multi struct and another one is in options. For P2P mode we don't set this flag in options, which is used in MTU calculation. As a result, automatically calculated MSS value in P2P mode is wrong, Fix by

[Openvpn-devel] [PATCH] GitHub Actions: trigger openvpn-build GHA on success

2022-06-03 Thread Lev Stipakov
From: Lev Stipakov After successfult builds on all platforms, start openvpn-build GHA which produces Windows MSI installers. Signed-off-by: Lev Stipakov --- .github/workflows/build.yaml | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.github

[Openvpn-devel] [PATCH v2] GitHub Actions: trigger openvpn-build GHA on success

2022-06-07 Thread Lev Stipakov
From: Lev Stipakov After successfult builds on all platforms, start openvpn-build GHA which produces Windows MSI installers. Signed-off-by: Lev Stipakov --- v2: - bring pull_request trigger back - simplify trigger_openvpn_build run condition .github/workflows/build.yaml | 19

Re: [Openvpn-devel] [PATCH OpenVPN3 1/2] ovpnagent: fix quoting of omiclient parameters

2022-06-07 Thread Lev Stipakov
As per discussion on https://github.com/OpenVPN/openvpn3/pull/218 Acked-by: Lev Stipakov ti 7. kesäk. 2022 klo 20.30 Christopher Ng (fac...@gmail.com) kirjoitti: > Signed-off-by: Christopher Ng > --- > openvpn/ovpnagent/win/ovpnagent.cpp | 6 -- > 1 file changed, 4 inse

Re: [Openvpn-devel] [PATCH OpenVPN3 2/2] omi: add support for ovpn-dco-win

2022-06-07 Thread Lev Stipakov
As discussed at https://github.com/OpenVPN/openvpn3/pull/218 Acked-by: Lev Stipakov ti 7. kesäk. 2022 klo 20.26 Christopher Ng (fac...@gmail.com) kirjoitti: > Signed-off-by: Christopher Ng > --- > openvpn/omi/CMakeLists.txt | 9 + > 1 file changed, 9 insertions(+) >

Re: [Openvpn-devel] [PATCH 19/25] dco-win: implement GetOverlappedResultEx for mingw32

2022-06-27 Thread Lev Stipakov
Hi, The problem this patch solves appeared on mingw-w64 for 32bit version 6.0.0, which is the latest version of mingw on Windows. When this patch was written (April 2021), we still used travis/appveyor which did mingw builds on Windows so back then patch made sense. Since we moved to GHa since th

Re: [Openvpn-devel] [PATCH 22/25] dco-win: introduce low-level code for handling ovpn-dco-win in Windows

2022-06-27 Thread Lev Stipakov
Hi, > +if (dco_get_overlapped_result(handle, ov, &transferred, > poll_interval_ms, FALSE) != 0) With the removal of mingw compat patch ("dco-win: implement GetOverlappedResultEx for mingw32"), this needs to be changed to GetOverlappedResultEx (signature is the same). -Lev

Re: [Openvpn-devel] [PATCH 22/25] dco-win: introduce low-level code for handling ovpn-dco-win in Windows

2022-06-28 Thread Lev Stipakov
Hi, I did some review / testing and suggest following changes to this patch: > +if (!DeviceIoControl(tt->hand, OVPN_IOCTL_START_VPN, NULL, 0, NULL, 0, > + &bytes_returned, NULL)) > +{ > +msg(M_ERR, "DeviceIoControl(OVPN_IOCTL_START_VPN) failed with code >

Re: [Openvpn-devel] [PATCH 23/25] dco-win: implement ovpn-dco support in P2P Windows code path

2022-06-28 Thread Lev Stipakov
Hi, I did some testing and found out that this breaks when establishing TCP connection to a server which cannot be reached: > +*tt = dco_create_socket(sock->info.lsa->current_remote, > +sock->bind_local, > +sock->info.lsa->bind_local, >

Re: [Openvpn-devel] [PATCH 25/25] dco-win: update GH Actions config file

2022-07-05 Thread Lev Stipakov
build with DCO in the > first place. There is no DCO code yet in master but somehow we have the > GH action for that :-D > > Anyway, can add a sentence to explain what is going on. > > Cheers, > > > > > On Fri, Jun 24, 2022 at 10:38:09AM +0200, Antonio Qua

[Openvpn-devel] [PATCH] openvpnmsica: remove OpenVPNService state check code

2022-07-28 Thread Lev Stipakov
From: Lev Stipakov This code reads the state of OpenVPNService, such as startup mode and running, and sets MSI property value. If that property is set, installer selects OpenVPNService as a feature to be installed. This has been superseded by change in installer: https://github.com/OpenVPN

Re: [Openvpn-devel] [PATCH 21/25] do_open_tun: restyle "can preserve TUN" check

2022-08-04 Thread Lev Stipakov
Hi, > +static bool > +can_preserve_tun(struct tuntap *tt) > +{ > +#ifdef TARGET_ANDROID > +return false; > +#elif _WIN32 > +return tt && tt->dco.real_tun_init; Looks like dco.real_tun_init has been added in the very next patch, 22/25. ___ Open

[Openvpn-devel] [PATCH] tun.c: remove unused gc_arena from init_tun()

2022-08-09 Thread Lev Stipakov
From: Lev Stipakov Signed-off-by: Lev Stipakov --- src/openvpn/tun.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 54f7d72c..f3152a52 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -745,7 +745,6 @@ init_tun(const char *dev

[Openvpn-devel] [PATCH] tun: properly handle device interface list

2022-08-11 Thread Lev Stipakov
From: Lev Stipakov Some adapters create multiple device interfaces and we need to enumerate all of them. Signed-off-by: Lev Stipakov --- src/openvpn/tun.c | 37 + src/openvpn/tun.h | 2 +- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a

[Openvpn-devel] [PATCH v2] tun: properly handle device interface list

2022-08-11 Thread Lev Stipakov
From: Lev Stipakov Some adapters create multiple device interfaces and we need to enumerate all of them. Signed-off-by: Lev Stipakov --- v2: uncrustify src/openvpn/tun.c | 35 --- src/openvpn/tun.h | 2 +- 2 files changed, 21 insertions(+), 16 deletions

Re: [Openvpn-devel] [PATCH v100 01/10] do_open_tun: restyle "can preserve TUN" check

2022-08-12 Thread Lev Stipakov
Stared at the code and slightly tested on Windows. Functionality hasn't changed and code is now easier to read. Acked-by: Lev Stipakov pe 12. elok. 2022 klo 16.08 Antonio Quartulli (a...@unstable.cc) kirjoitti: > The current condition checking if the TUN interface was preserved is >

Re: [Openvpn-devel] [PATCH v100 02/10] dco-win: introduce low-level code for handling ovpn-dco-win in Windows

2022-08-12 Thread Lev Stipakov
Hi, General note - this commit has no commit message and introduces a set of functions which are not yet called. Does it really make sense to split dco-win support into two commits? src/openvpn/ovpn-dco-win.h | 108 > We have ovpn_dco_linux.h and ovpn-dco-win.h. Should we unif

Re: [Openvpn-devel] [PATCH v100 02/10] dco-win: introduce low-level code for handling ovpn-dco-win in Windows

2022-08-12 Thread Lev Stipakov
Oh and also: 6>C:\Users\lev\Projects\openvpn\src\openvpn\dco.c(280,27): error C2039: 'disable_dco': is not a member of 'tuntap_options' 6>C:\Users\lev\Projects\openvpn\src\openvpn\tun.h(64): message : see declaration of 'tuntap_options' -Lev ___ Openvpn

Re: [Openvpn-devel] [PATCH v100 03/10] dco-win: add platform dependant check on incompatible options

2022-08-12 Thread Lev Stipakov
is in use. > > Signed-off-by: Antonio Quartulli > Signed-off-by: Lev Stipakov > --- > src/openvpn/dco.c | 17 +++-- > src/openvpn/options.c | 5 + > 2 files changed, 20 insertions(+), 2 deletions(-) > > diff --git a/src/openvpn/dco.c b/src/ope

Re: [Openvpn-devel] [PATCH v100 05/10] dco-win: add documentation to README.dco.md

2022-08-12 Thread Lev Stipakov
Hi, +Getting started (Windows) > +- > +Getting started under windows is currently for brave people having > experience > +with windows development. You need to compile openvpn yourself and also > need > +to get the test driver installed on your system. > While I consider b

Re: [Openvpn-devel] [PATCH v101 1/7] dco-win: introduce low-level code for handling ovpn-dco-win in Windows

2022-08-13 Thread Lev Stipakov
called yet - I am OK with that if it makes code easier to review. Disclaimer: I contributed some code to this commit, so I might be slightly biased. Acked-by: Lev Stipakov la 13. elok. 2022 klo 23.43 Antonio Quartulli (a...@unstable.cc) kirjoitti: > Signed-off-by: Arne Schwabe > Sign

[Openvpn-devel] [PATCH] error.c: remove unused crash() function

2022-08-13 Thread Lev Stipakov
From: Lev Stipakov This has been added in 2006 and as of now not used. Signed-off-by: Lev Stipakov --- src/openvpn/error.c | 9 - src/openvpn/error.h | 5 - 2 files changed, 14 deletions(-) diff --git a/src/openvpn/error.c b/src/openvpn/error.c index 7cd35b17..c8c77358 100644

Re: [Openvpn-devel] [PATCH v101 2/7] dco-win: check for incompatible options

2022-08-13 Thread Lev Stipakov
Again, this cannot be tested yet. Stared at the code and tested with follow-up commits, looks good and works as expected. Acked-by: Lev Stipakov la 13. elok. 2022 klo 23.43 Antonio Quartulli (a...@unstable.cc) kirjoitti: > At the moment dco-win doesn't support --persist-tun and

Re: [Openvpn-devel] [PATCH v102 6/7] dco-win: ensure the DCO API is not used when running on Windows

2022-08-14 Thread Lev Stipakov
ugh the OpenVPN function we use is called "link_socket_write_win32()". I would change the above mentioned comment to "normal Overlapped I/O". Maybe this could be done at commit. Also, as mentioned in chat, this should be merged before 3/7 ("dco-win: implement ovpn-dco

Re: [Openvpn-devel] [PATCH] Allow querying DCO status via management status

2022-08-14 Thread Lev Stipakov
interface, just by sending SIGUSR2, maybe "multi.c: include DCO status in status version 2" would be better? Acked-by: Lev Stipakov ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel

[Openvpn-devel] [PATCH] tun: properly handle device interface list

2022-08-15 Thread Lev Stipakov
From: Lev Stipakov Device interface is a path which is used by userspace to access device. A driver can create one or more device interfaces and specify "reference string", so that userspace could enumerate all device interfaces in the list and pick the corrct one which ends with

[Openvpn-devel] [PATCH] dco.h: fix return type when DCO is not enabled

2022-08-17 Thread Lev Stipakov
From: Lev Stipakov The correct return type for those functions is int, so adjust return type accordingly for the cases when DCO is not defined. Signed-off-by: Lev Stipakov --- src/openvpn/dco.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/openvpn/dco.h b/src

[Openvpn-devel] [PATCH v2] dco.h: fix return type when DCO is not enabled

2022-08-17 Thread Lev Stipakov
From: Lev Stipakov The correct return type for those functions is int, so adjust return type accordingly for the cases when DCO is not defined. Signed-off-by: Lev Stipakov --- v2: also do "return 0" in dco_p2p_add_new_peer() src/openvpn/dco.h | 8 1 file changed, 4 insert

Re: [Openvpn-devel] [PATCH v101 5/7] dco-win: update GH Actions config file

2022-08-19 Thread Lev Stipakov
Hi, I remember someone was explaining to me the necessity of verbose commit messages. Chi può essere? > It seems to take an existing setup that builds an installer *with* DCO, > and remove the DCO bits? > ... so maybe we can have a better commit message that explains this? We decided to move t

Re: [Openvpn-devel] [PATCH v101 3/7] dco-win: implement ovpn-dco support in P2P Windows code path

2022-08-19 Thread Lev Stipakov
12.02 Gert Doering (g...@greenie.muc.de) kirjoitti: > > Hi, > > On Sat, Aug 13, 2022 at 10:42:20PM +0200, Antonio Quartulli wrote: > > With this change it is possible to use ovpn-dco-win when running OpenVPN > > in client or P2P mode. > > > > Signed-off-by:

[Openvpn-devel] [PATCH v102 3/7] dco-win: implement ovpn-dco support in P2P Windows code path

2022-08-19 Thread Lev Stipakov
From: Antonio Quartulli With this change it is possible to use ovpn-dco-win when running OpenVPN in client or P2P mode. Signed-off-by: Arne Schwabe Signed-off-by: Lev Stipakov Signed-off-by: Antonio Quartulli --- Changes from v101: * move tuntap_is_dco_win() check from init.c to open_tun

[Openvpn-devel] [PATCH] dco-win: use run-time dynamic linking for GetOverlappedResultEx

2022-08-20 Thread Lev Stipakov
From: Lev Stipakov This function is available starting from Windows 8. Calling it "as is" causes startup error on Windows 7. dco-win driver available on Windows 10 20H1 and newer. On older systems installer will not show nor install the driver and dco-win code won't be reached

[Openvpn-devel] [PATCH] vcpkg: bump baseline version

2022-08-20 Thread Lev Stipakov
From: Lev Stipakov This allows us to use newer versions of dependencies, such as openssl 3.0.2 -> 3.0.5. Signed-off-by: Lev Stipakov --- .github/workflows/build.yaml | 2 +- src/openvpn/vcpkg.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workfl

Re: [Openvpn-devel] [PATCH v102 3/7] dco-win: implement ovpn-dco support in P2P Windows code path

2022-08-20 Thread Lev Stipakov
elok. 2022 klo 19.06 Gert Doering (g...@greenie.muc.de) kirjoitti: > > Hi, > > On Fri, Aug 19, 2022 at 10:30:05PM +0300, Lev Stipakov wrote: > > From: Antonio Quartulli > > > > With this change it is possible to use ovpn-dco-win when running OpenVPN > > in c

[Openvpn-devel] [PATCH v103] dco-win: implement ovpn-dco support in P2P Windows code path

2022-08-22 Thread Lev Stipakov
From: Antonio Quartulli With this change it is possible to use ovpn-dco-win when running OpenVPN in client or P2P mode. Signed-off-by: Arne Schwabe Signed-off-by: Lev Stipakov Signed-off-by: Antonio Quartulli --- Changes from v102: * use "windows-driver ovpn-dco" without trai

Re: [Openvpn-devel] [PATCH v103] dco-win: implement ovpn-dco support in P2P Windows code path

2022-08-22 Thread Lev Stipakov
verified that ChaCha20-Poly1305 (cipher supported starting from Windows 11) works fine with the dco-win driver , as well as the good old AES-256-GCM. More testers are very welcomed. ma 22. elok. 2022 klo 11.56 Lev Stipakov (lstipa...@gmail.com) kirjoitti: > > From: Antonio Quartulli > &g

Re: [Openvpn-devel] [PATCH v103] dco-win: implement ovpn-dco support in P2P Windows code path

2022-08-23 Thread Lev Stipakov
Another feedback - I asked our corp QA engineer to give this build a try, here are results: --- Testing OpenVPN GUI on Windows 11: - install, remove and upgrade from 2.5.7 to https://github.com/lstipakov/openvpn-build/actions/runs/2902240643 - Connection with `DCO` via autologin, user-locked, clou

[Openvpn-devel] [PATCH v104] dco-win: implement ovpn-dco support in P2P Windows code path

2022-08-25 Thread Lev Stipakov
From: Antonio Quartulli With this change it is possible to use ovpn-dco-win when running OpenVPN in client or P2P mode. Signed-off-by: Arne Schwabe Signed-off-by: Lev Stipakov Signed-off-by: Antonio Quartulli --- Changes from v103: * Query DCO code for default --data-ciphers only on

[Openvpn-devel] [PATCH v105] dco-win: implement ovpn-dco support in P2P Windows code path

2022-08-25 Thread Lev Stipakov
From: Antonio Quartulli With this change it is possible to use ovpn-dco-win when running OpenVPN in client or P2P mode. Signed-off-by: Arne Schwabe Signed-off-by: Lev Stipakov Signed-off-by: Antonio Quartulli --- Changes from v104: * query first crypto library for chacha support and then

[Openvpn-devel] OpenVPN Windows DCO driver

2022-08-26 Thread Lev Stipakov
Dear all, The DCO driver for Windows (https://github.com/openvpn/ovpn-dco-win) implements OpenVPN data channel in kernel, eliminating context switch and thus noticeably improves performance. Support for dco-win driver has been merged into openvpn master branch and openvpn installer: x64: htt

[Openvpn-devel] [PATCH] dco-win: support for --persist-tun

2022-08-29 Thread Lev Stipakov
From: Lev Stipakov Since version 0.8.0, dco-win driver added support for DEL_PEER command, which enabled --persist-tun implementation on client side. Add real implementation for dco_del_peer on Windows, which calls DEL_PEER, which clears peer state on the driver without tearing tunnel down

[Openvpn-devel] [PATCH v2] dco-win: support for --persist-tun

2022-08-30 Thread Lev Stipakov
From: Lev Stipakov Since version 0.8.0, dco-win driver added support for DEL_PEER command, which enabled --persist-tun implementation on client side. Add real implementation for dco_del_peer on Windows, which calls DEL_PEER, which clears peer state on the driver without tearing tunnel down

Re: [Openvpn-devel] [PATCH] dco-win: support for --persist-tun

2022-08-30 Thread Lev Stipakov
seen those for a while, which > means that the previous driver version (0.7.6) is stable and new one (with > persist tun support) is not. > > We’ll get back to this patch when I’ll fix the driver. > > Lähetetty iPhonesta > > > Lev Stipakov kirjoitti 29.8.2022 kello 14.51:

[Openvpn-devel] [PATCH] msvc: remove .filters file

2022-09-05 Thread Lev Stipakov
From: Lev Stipakov Filters file defines custom logical folders in Solution Explorer. We don't use this functionality and it requires maintenance, so let's remove it. While on it, remove dco linux files from VS project. Signed-off-by: Lev Stipakov --- src/openvpn/openvpn.vcxproj

[Openvpn-devel] [PATCH v2] msvc: remove .filters files

2022-09-05 Thread Lev Stipakov
From: Lev Stipakov Filters file defines custom logical folders in Solution Explorer. We don't use this functionality and it requires maintenance, so let's remove those. While on it, remove dco linux files from VS project. Signed-off-by: Lev Stipakov --- v2: remove .filters files

[Openvpn-devel] [PATCH] do_persist_tuntap: remove indentation level

2022-09-08 Thread Lev Stipakov
From: Lev Stipakov Reverse if condition - this allows us to get rid of indentation level, which makes code easier to read. Signed-off-by: Lev Stipakov --- src/openvpn/init.c | 88 -- 1 file changed, 45 insertions(+), 43 deletions(-) diff --git a

[Openvpn-devel] [PATCH] dco.c: check certain options only on startup

2022-09-09 Thread Lev Stipakov
From: Lev Stipakov Following options are set on startup and cannot be changed later: - dev - dev-type - connections list - mode - topology Same for system-wide availability of dco. dco_check_option_conflict(), where those options were checked, is also called in server mode when client is

[Openvpn-devel] [PATCH v2] dco.c: check certain options only on startup

2022-09-09 Thread Lev Stipakov
From: Lev Stipakov Following options are set on startup and cannot be changed later: - dev - dev-type - connections list - mode - topology Same for system-wide availability of dco. dco_check_option_conflict(), where those options were checked, is also called in server mode when client is

[Openvpn-devel] [PATCH] Use DCO on Windows by default

2022-09-09 Thread Lev Stipakov
From: Lev Stipakov On startup, check following conditions: - ovpn-dco-win driver is installed. Perform this check by trying to open adapter by symbolic name. - options are compatible with dco. Same checks as on Linux and FreeBSD. In addition, check that --mode server is not used and

[Openvpn-devel] [PATCH v2] Use DCO on Windows by default

2022-09-12 Thread Lev Stipakov
From: Lev Stipakov On startup, check following conditions: - ovpn-dco-win driver is installed. Perform this check by trying to open adapter by symbolic name. - options are compatible with dco. Same checks as on Linux and FreeBSD. In addition, check that --mode server is not used and

Re: [Openvpn-devel] [PATCH v2] Use DCO on Windows by default

2022-09-14 Thread Lev Stipakov
Hi, > One general question about the patch: Whenever we have > defined(TARGET_LINUX) || defined(TARGET_FREEBSD) || defined(_WIN32) > in the DCO code, couldn't we just remove it completely? > Since this is bascially "every time" anyway, isn't it? Well, almost. There is also Mac and some other plat

[Openvpn-devel] [PATCH v3] Use DCO on Windows by default

2022-09-14 Thread Lev Stipakov
From: Lev Stipakov On startup, check following conditions: - ovpn-dco-win driver is installed. Perform this check by trying to open adapter by symbolic name. - options are compatible with dco. Same checks as on Linux and FreeBSD. In addition, check that --mode server is not used and

[Openvpn-devel] [PATCH v4] Use DCO on Windows by default

2022-09-15 Thread Lev Stipakov
From: Lev Stipakov On startup, check following conditions: - ovpn-dco-win driver is installed. Perform this check by trying to open adapter by symbolic name. - options are compatible with dco. Same checks as on Linux and FreeBSD. In addition, check that --mode server is not used and

[Openvpn-devel] [PATCH] doc: add "ovpn-dco" to usage and man page

2022-09-15 Thread Lev Stipakov
From: Lev Stipakov While on it, remove redundant sentence and quotation from --windows-driver man description. Signed-off-by: Lev Stipakov --- doc/man-sections/windows-options.rst | 8 src/openvpn/options.c| 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff

[Openvpn-devel] [PATCH v2] doc: add "ovpn-dco" to usage and man page

2022-09-17 Thread Lev Stipakov
From: Lev Stipakov While on it, remove redundant sentence and quotation mark from --windows-driver man description. Signed-off-by: Lev Stipakov --- v2: - mark ovpn-dco adapter as default, instead of tap-windows6 - mention that ovpn-dco requires --dev tun doc/man-sections/windows

[Openvpn-devel] [PATCH release/2.5] msvc: add branch name and commit hash to version output

2022-09-22 Thread Lev Stipakov
From: Lev Stipakov Add a simple python script which generates header with branch name and commit hash #defines. While on it, fix filename in msvc-generate.vcxproj and add proper copyright header to Makefile.mak. Signed-off-by: Lev Stipakov --- build/msvc/msvc-generate/Makefile.mak

[Openvpn-devel] [PATCH] msvc: add branch name and commit hash to version output

2022-09-22 Thread Lev Stipakov
From: Lev Stipakov Add a simple python script which generates header with branch name and commit hash #defines. While on it, fix filename in msvc-generate.vcxproj and add proper copyright header to Makefile.mak. Signed-off-by: Lev Stipakov --- build/msvc/msvc-generate/Makefile.mak

[Openvpn-devel] [PATCH] msvc: add branch name and commit hash to version output

2022-09-22 Thread Lev Stipakov
From: Lev Stipakov Add a simple python script which generates header with branch name and commit hash #defines. While on it, fix filename in msvc-generate.vcxproj and add proper copyright header to Makefile.mak. Signed-off-by: Lev Stipakov --- v2: - fix copyright year 2002 -> 2

[Openvpn-devel] [PATCH v2 release/2.5] msvc: add branch name and commit hash to version output

2022-09-22 Thread Lev Stipakov
From: Lev Stipakov Add a simple python script which generates header with branch name and commit hash #defines. While on it, fix filename in msvc-generate.vcxproj and add proper copyright header to Makefile.mak. Signed-off-by: Lev Stipakov --- v2: - fix copyright year 2002 -> 2

Re: [Openvpn-devel] [PATCH release/2.5] msvc: add branch name and commit hash to version output

2022-09-22 Thread Lev Stipakov
Hi, I've sent v2 with copyright year and "not-a-git" -> "unknown" fix. (I forgot to name master patch to PATCH v2) Yes, when doing releases we do git checkout. I have tested MSI installers produced by openvpn-build GitHub automation, which uses the same script (build-and-package.ps1) which relea

[Openvpn-devel] [PATCH v3] msvc: add branch name and commit hash to version output

2022-09-23 Thread Lev Stipakov
From: Lev Stipakov Add a simple python script which generates header with branch name and commit hash #defines. While on it, fix filename in msvc-generate.vcxproj and add proper copyright header to Makefile.mak. Signed-off-by: Lev Stipakov --- v3: - properly handle branchnames like release

[Openvpn-devel] [PATCH v3 release/2.5] msvc: add branch name and commit hash to version output

2022-09-23 Thread Lev Stipakov
From: Lev Stipakov Add a simple python script which generates header with branch name and commit hash #defines. While on it, fix filename in msvc-generate.vcxproj and add proper copyright header to Makefile.mak. Signed-off-by: Lev Stipakov --- v3: - properly handle branchnames like

[Openvpn-devel] [PATCH v4 release/2.5] msvc: add branch name and commit hash to version output

2022-09-23 Thread Lev Stipakov
From: Lev Stipakov Add a simple python script which generates header with branch name and commit hash #defines. While on it, fix filename in msvc-generate.vcxproj and add proper copyright header to Makefile.mak. Signed-off-by: Lev Stipakov --- v4: - replace backslash with slash - instead

[Openvpn-devel] [PATCH v4] msvc: add branch name and commit hash to version output

2022-09-23 Thread Lev Stipakov
From: Lev Stipakov Add a simple python script which generates header with branch name and commit hash #defines. While on it, fix filename in msvc-generate.vcxproj and add proper copyright header to Makefile.mak. Signed-off-by: Lev Stipakov --- v4: - replace backslash with slash - instead

[Openvpn-devel] [PATCH v5] msvc: add branch name and commit hash to version output

2022-09-25 Thread Lev Stipakov
From: Lev Stipakov Add a simple python script which generates header with branch name and commit hash #defines. While on it, fix filename in msvc-generate.vcxproj and add proper copyright header to Makefile.mak. Signed-off-by: Lev Stipakov --- v5: - replace "detached" with "n

[Openvpn-devel] [PATCH v5 release/2.5] msvc: add branch name and commit hash to version output

2022-09-26 Thread Lev Stipakov
From: Lev Stipakov Add a simple python script which generates header with branch name and commit hash #defines. While on it, fix filename in msvc-generate.vcxproj and add proper copyright header to Makefile.mak. Signed-off-by: Lev Stipakov --- v5: - replace "detached" with "n

Re: [Openvpn-devel] [PATCH 1/3] Move dco_installed from sock->info to sock->info.lsa.actual

2022-10-18 Thread Lev Stipakov
NAK. static inline int link_socket_read_udp_win32(struct link_socket *sock, struct buffer *buf, struct link_socket_actual *from) { sockethandle_t sh = { .s = sock->sd }; if (sock->info.dco_installed) 2>C:\Users\lev\Projects\openvpn\src

Re: [Openvpn-devel] [PATCH v2 1/3] Move dco_installed from sock->info to sock->info.lsa.actual

2022-11-01 Thread Lev Stipakov
Hi, > @@ -1190,7 +1190,7 @@ link_socket_write(struct link_socket *sock, >struct buffer *buf, >struct link_socket_actual *to) > { > -if (proto_is_udp(sock->info.proto) || sock->info.dco_installed) > +if (proto_is_udp(sock->info.proto) || to->dco_inst

[Openvpn-devel] [PATCH] vcpkg: use the latest versions of dependency ports

2022-11-02 Thread Lev Stipakov
From: Lev Stipakov By removing builin-baseline constraint, we force vcpkg to use latest versions of ports. As a side effect, this bumps OpenSSL to 3.0.7. While on it, update vcpkg commit in GHA. We also have to apply a workaround for GHA to make it use our vcpkg checkout instead of c:\vcpkg

[Openvpn-devel] [PATCH] win32: detect arm64 architecture and emulations

2022-11-04 Thread Lev Stipakov
From: Lev Stipakov Properly detect process architecture and machine architecture, including arm64. Print process architecture and, if machine architecture is different (we are running in emulation), print that too. Signed-off-by: Lev Stipakov --- src/openvpn/win32.c | 123

Re: [Openvpn-devel] [PATCH] win32: detect arm64 architecture and emulations

2022-11-05 Thread Lev Stipakov
11:02:47AM +0200, Lev Stipakov wrote:From: Lev Stipakov Properly detect process architecture andmachine architecture, including arm64.Print process architecture and, if machinearchitecture is different (we are running inemulation), print that too.This looks generally good, so definitely a "fe

Re: [Openvpn-devel] [PATCH v2] msvc: always call git-version.py

2022-11-11 Thread Lev Stipakov
Don't know if I can ack the patch to which I've contributed - but anyway, the makefile change looks good and the python script doesn't regenerate version header (which would trigger recompilation of some files). Tested locally and GHA is happy. Acked-b

[Openvpn-devel] [PATCH] INSTALL: update Windows notes

2022-11-29 Thread Lev Stipakov
From: Lev Stipakov Also slightly fix indent. Signed-off-by: Lev Stipakov --- INSTALL | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/INSTALL b/INSTALL index da9b88e7..db24e98c 100644 --- a/INSTALL +++ b/INSTALL @@ -24,9 +24,9 @@ OpenVPN releases are

[Openvpn-devel] [PATCH] dco: disable dco on Windows if --remote is not defined

2022-12-01 Thread Lev Stipakov
From: Lev Stipakov At the moment Windows driver requires remote to work. Signed-off-by: Lev Stipakov --- src/openvpn/dco.c | 8 1 file changed, 8 insertions(+) diff --git a/src/openvpn/dco.c b/src/openvpn/dco.c index 47fb0003..19a449ba 100644 --- a/src/openvpn/dco.c +++ b/src

[Openvpn-devel] [PATCH 1/2] management: refactor bytecount routines

2022-12-12 Thread Lev Stipakov
From: Lev Stipakov In preparation of DCO stats support, simplify call chains of bytecount routines. No functional changes. Signed-off-by: Lev Stipakov --- src/openvpn/forward.c | 4 +-- src/openvpn/manage.c | 64 - src/openvpn/manage.h | 66

[Openvpn-devel] [PATCH 2/2] management: add timer to push BYTECOUNT

2022-12-12 Thread Lev Stipakov
From: Lev Stipakov At the moment BYTECOUNT in,out is pushed if there is traffic. With DCO, userspace process doesn't see the traffic, so we need to add a timer which periodically fetches stats from DCO and pushes to management client. The timer interval is set by existing "b

Re: [Openvpn-devel] [PATCH 1/4] Read DCO traffic stats from the kernel

2022-12-12 Thread Lev Stipakov
Hi, This is good - I need an API to get stats to make openvpn-gui show those (via the management interface). I am not too much into FreeBSD parts, but > +hash_iterator_init(m->hash, &hi); > + > +while ((he = hash_iterator_next(&hi))) > +{ > +struct multi_instance *mi = (struc

[Openvpn-devel] [PATCH] management: add timer to output BYTECOUNT

2022-12-13 Thread Lev Stipakov
From: Lev Stipakov BYTECOUNT on management interface is used to display client stats, for example by openvpn-gui. At the moment BYTECOUNT is sent if there is a traffic. With DCO, userspace process doesn't see data channel traffic, BYTECOUNT is not sent and therefore stats are not updated.

[Openvpn-devel] [PATCH] Rename dco_get_peer_stats to dco_get_peer_stats_multi

2022-12-14 Thread Lev Stipakov
From: Lev Stipakov Existing API and implementation (FreeBSD only) are designed for server usage. Rename it to *_multi to indicate that and not to mix with upcoming client API/implementation. Signed-off-by: Lev Stipakov --- src/openvpn/dco.h | 4 ++-- src/openvpn/dco_freebsd.c | 2

[Openvpn-devel] [PATCH] msvc: upgrade to Visual Studio 2022

2022-12-14 Thread Lev Stipakov
From: Lev Stipakov Signed-off-by: Lev Stipakov --- build/msvc/msvc-generate/msvc-generate.vcxproj | 12 ++-- src/compat/compat.vcxproj | 12 ++-- src/openvpn/openvpn.vcxproj| 12 ++-- src/openvpnmsica/openvpnmsica.vcxproj

[Openvpn-devel] [PATCH] Introduce dco_get_peer_stats API and Windows implementation

2022-12-14 Thread Lev Stipakov
From: Lev Stipakov dco_get_peer_stats fetches stats for a single peer. This is mostly useful in client mode. So far only Windows implements that. Signed-off-by: Lev Stipakov --- src/openvpn/dco.h | 13 + src/openvpn/dco_freebsd.c | 7 +++ src/openvpn/dco_linux.c

Re: [Openvpn-devel] [PATCH] Introduce dco_get_peer_stats API and Windows implementation

2022-12-14 Thread Lev Stipakov
Hi, > Good to see this happening.. Turns out there is a bug in the driver at the moment - it doesn't update OUT bytes. This particular API hasn't been used in a while. > Does this data from the driver include both control and data channel bytes? Yes, at the moment those are "link" bytes and th

Re: [Openvpn-devel] [PATCH] Introduce dco_get_peer_stats API and Windows implementation

2022-12-14 Thread Lev Stipakov
> This data will also show up as stats on the adapter (device node) and should > include all traffic that passes through it, no? System adapter stats show only tun traffic - the one driver indicates to NetAdapter. For BYTECOUNT we (userspace client) currently show link traffic - encapsulated cont

[Openvpn-devel] [PATCH v2] Introduce dco_get_peer_stats API and Windows implementation

2022-12-14 Thread Lev Stipakov
From: Lev Stipakov dco_get_peer_stats fetches stats for a single peer. This is mostly useful in client mode. So far only Windows implements that. Signed-off-by: Lev Stipakov --- v2: fix error message text src/openvpn/dco.h | 13 + src/openvpn/dco_freebsd.c | 7

[Openvpn-devel] [PATCH v2] management: add timer to output BYTECOUNT

2022-12-14 Thread Lev Stipakov
From: Lev Stipakov BYTECOUNT on management interface is used to display client stats, for example by openvpn-gui. At the moment BYTECOUNT is sent if there is a traffic. With DCO, userspace process doesn't see data channel traffic, BYTECOUNT is not sent and therefore stats are not updated.

Re: [Openvpn-devel] [PATCH] Introduce dco_get_peer_stats API and Windows implementation

2022-12-14 Thread Lev Stipakov
Hi, Selva has asked about a build which includes this patch. Here is MSI installer which incorporates required client patches - management: add timer to output BYTECOUNT - Introduce dco_get_peer_stats API and Windows implementation and a new driver version (0.8.3) with stats fixes. https://g

Re: [Openvpn-devel] [PATCH] vcpkg-ports/pkcs11-helper: support loader flags

2022-12-14 Thread Lev Stipakov
code of openvpn in this patch. I haven't tested actual pkcs11 functionality. Note that while applying "outside" patch "git am" complains about whitespace errors, but "this is fine" - those are from the "inside" patch. Acked-by: Lev Stipakov __

Re: [Openvpn-devel] [PATCH] Introduce dco_get_peer_stats API and Windows implementation

2022-12-15 Thread Lev Stipakov
Hi, > In non-dco use, the stats as persisted by the management interface are not > reset throughout the lifetime of the process. With dco, what the driver > provides is "Peer Stats" which is reset in OvpnPeerNew() (linux appears to > do the same). A quick option > would be to move the zero-ing

Re: [Openvpn-devel] [PATCH applied] Re: management: add timer to output BYTECOUNT

2022-12-15 Thread Lev Stipakov
Hi, > So it seems as the timer activation got delayed somehow > -> this is something we need to come back to, when Linux/FreeBSD DCO > stats get implemented. Starting with "management-hold", then "bytecount", > then "hold release" gave me counters right away. Mysteries... This is because we do

[Openvpn-devel] [PATCH] git-version.py: use tag as branch name

2022-12-16 Thread Lev Stipakov
From: Lev Stipakov Git magic to get branch name git rev-parse --symbolic-full-name HEAD doesn't work when we're on tag, which is the case when we build releases. In this case, use tag name as branch name with another git magic: git describe --tags This fixes https://github.c

Re: [Openvpn-devel] [PATCH] Persist DCO client data channel traffic stats on restart

2022-12-16 Thread Lev Stipakov
ve DCO stats before tearing the tunnel down. But anyway, Code looks good, compiled and tested - stats are indeed preserved across reconnect. Acked-by: Lev Stipakov ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourcefor

[Openvpn-devel] [PATCH v2] git-version.py: proper support for tags

2022-12-19 Thread Lev Stipakov
From: Lev Stipakov Git magic to get branch name git rev-parse --symbolic-full-name HEAD doesn't work when we're on tag, which is the case when we build releases. First, try to get tag name with git describe --exact-match and if this fails, get branch name as be

[Openvpn-devel] [PATCH v3] git-version.py: proper support for tags

2022-12-19 Thread Lev Stipakov
From: Lev Stipakov Git magic to get branch name git rev-parse --symbolic-full-name HEAD doesn't work when we're on tag, which is the case when we build releases. First, try to get tag name with git describe --exact-match and if this fails, get branch name as be

Re: [Openvpn-devel] [PATCH] Properly unmap ring buffer file-map in interactive service

2022-12-29 Thread Lev Stipakov
Hi, > The return value of MapViewOfFile must be passed to UnmapViewofFile, > instead of the file handle. Good catch! > Fixes #206 Strangely enough, I am not able to reproduce this bug - I posted logs to the GitHub issue. Fix indeed makes sense. Indeed, according to docs, UnmapViewOfFile() acce

Re: [Openvpn-devel] [PATCH v2] Properly unmap ring buffer file-map in interactive service

2022-12-29 Thread Lev Stipakov
Acked-by: Lev Stipakov to 29. jouluk. 2022 klo 15.48 selva.n...@gmail.com kirjoitti: > > From: Selva Nair > > The return value of MapViewOfFile must be passed to UnmapViewofFile, > instead of the file handle. > > Fixes #206 > > v2: move *ring = NULL inside if {} &g

Re: [Openvpn-devel] [PATCH 1/2] Use undo_lists for saving ring-buffer handles in interactive service

2022-12-30 Thread Lev Stipakov
ad of the list */ > static BOOL > -CmpEngine(LPVOID item, LPVOID any) > +CmpAny(LPVOID item, LPVOID any) I wonder why it was called CmpEngine in the first place? Code looks good, tested with wintun and dco driver (latter is not affected by the change, but just to make sure).

Re: [Openvpn-devel] [PATCH 2/2] Cleanup: Close duplicated handles in interactive service

2022-12-30 Thread Lev Stipakov
Hi, Indeed, no need to keep those handles for the duration of openvpn process lifetime, they're needed only for registration. Compiled and tested. Acked-by: Lev Stipakov ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net

Re: [Openvpn-devel] [PATCH v2 4/5] Fix signal handling on Windows

2023-01-05 Thread Lev Stipakov
Hi, > -else if (n > 0) > +else > { > -sleep(n); > +#ifdef _WIN32 > +win32_sleep(n); > +#else > +if (n > 0) > +{ > +sleep(n); My understanding is that we want to have interruptible sleep. In this case, what is the point of calling win32_sle

Re: [Openvpn-devel] [PATCH v4 4/5] Fix signal handling on Windows

2023-01-06 Thread Lev Stipakov
\Projects\openvpn-build\src\openvpn\ARM64-Output\Debug\openvpn.exe (process 11476) exited with code 0. 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 1/3] Use IPAPI for setting ipv6 routes when iservice not available

2023-01-06 Thread Lev Stipakov
Hi, Compiled and slightly tested - pinged server's tunnel IPv6 address. Acked-by: Lev Stipakov ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel

<    1   2   3   4   5   6   7   8   >