[Openvpn-devel] [PATCH applied] Re: do_open_tun: restyle 'can preserve TUN' check

2022-08-13 Thread Gert Doering
This one really needs "git show -w"... and indeed, the old one was amazingly ugly, including "confusing uncrustify enough so the 'else' with no indent happened"... Client-tested on Linux. Your patch has been applied to the master branch. commit bd139689a4d2f813081aaf93149eabee8d941731 Author:

Re: [Openvpn-devel] [PATCH 1/2] ovpn-dco: introduce FreeBSD data-channel offload support

2022-08-13 Thread Kristof Provost via Openvpn-devel
On 13 Aug 2022, at 10:10, Gert Doering wrote: > On Thu, Aug 11, 2022 at 05:25:05PM +0200, Kristof Provost via Openvpn-devel > wrote: >>> - running openvpn over TCP gives me a kernel panic - this is not so >>>nice... (see attached .png from the vmware console) - userland seems >>>to

Re: [Openvpn-devel] [PATCH 1/2] ovpn-dco: introduce FreeBSD data-channel offload support

2022-08-13 Thread Gert Doering
Hi, On Thu, Aug 11, 2022 at 05:25:05PM +0200, Kristof Provost via Openvpn-devel wrote: > > - running openvpn over TCP gives me a kernel panic - this is not so > >nice... (see attached .png from the vmware console) - userland seems > >to assume "kernel can do TCP", kernel panics on "if

Re: [Openvpn-devel] [PATCH 1/2] ovpn-dco: introduce FreeBSD data-channel offload support

2022-08-13 Thread Kristof Provost via Openvpn-devel
On 11 Aug 2022, at 23:11, Gert Doering wrote: > If you're interested, I can unicast you the full file I use for > my DCO client tests, with different ciphers, some instances with > compression (= does it properly fall back?), some with http/socks > proxy, etc., plus a set of client+ca certificates

[Openvpn-devel] [PATCH] do_close_tun: get rid of one level of indentation

2022-08-13 Thread Antonio Quartulli
OpenVPN often uses a multi-indentation pattern with no real gain: if (a) { if (b) { ... } } This approach makes the code harder to read because a lot of space is eaten by indentation. Cases like this can be easily converted by negating the first condition and exiting

[Openvpn-devel] [PATCH applied] Re: ovpn-dco: introduce FreeBSD data-channel offload support

2022-08-13 Thread Gert Doering
Acked-by: Gert Doering Stared at the code, stared at the diff, the changes are what I asked for (thanks :-) ). I'm sure we'll find more stuff to polish, but I want this to proceed so the merge conflict with dco-win can be fixed by rebasing that other tree... (which is needed anyway).

Re: [Openvpn-devel] [PATCH applied] Re: ovpn-dco: introduce FreeBSD data-channel offload support

2022-08-13 Thread Gert Doering
Hi, On Sat, Aug 13, 2022 at 02:22:55PM +0200, Gert Doering wrote: > Uncrustify complained about a few tab-vs-space things, which I adjusted > (mostly in ovpn_dco_freebsd.h). And promptly forgot to do "git commit --amend" on *both* files. So here comes a whitespace correction commit again...

[Openvpn-devel] [PATCH applied] Re: do_close_tun: get rid of one level of indentation

2022-08-13 Thread Gert Doering
Acked-by: Gert Doering Side note: Arne has changed quite a few functions in this way during TLS/Frame stuff refactorings, so this is "the agreed way" to handle "we can not do anything here if this is not true" clauses. Mildly tested on FreeBSD client. Your patch has been applied to the master

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

2022-08-13 Thread Antonio Quartulli
At the moment dco-win doesn't support --persist-tun and --server, so check for these options at startup time. Signed-off-by: Antonio Quartulli Signed-off-by: Lev Stipakov --- Changes from v100: * improved commit title/message --- src/openvpn/dco.c | 17 +++--

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

2022-08-13 Thread 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 v100: * rebased (fixed conflicts in options.h and tun.h) Changes from v3: * rename

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

2022-08-13 Thread Antonio Quartulli
Signed-off-by: Arne Schwabe Signed-off-by: Lev Stipakov Signed-off-by: Antonio Quartulli --- Changes from v100: * rebased (fixed conflict in configure.ac) * fixed access to disable_dco member in dco.c * renamed ovpn-dco-win.h to ovpn_dco_win.h * make tun_open_device and close_tun_handle non

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

2022-08-13 Thread Antonio Quartulli
On Windows the high level API should still use the link_socket object to read and write packets. For this reason, even if dco_installed is true, we still need to rely on the classic link_socket object. Signed-off-by: Antonio Quartulli --- Changes from v100: * removed ASSERTs (moved to previous

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

2022-08-13 Thread Antonio Quartulli
Signed-off-by: Lev Stipakov Signed-off-by: Antonio Quartulli --- .github/workflows/build.yaml | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c89d3c8c..6bd108b9 100644 --- a/.github/workflows/build.yaml

[Openvpn-devel] [PATCH v101 7/7] dco: properly name variables

2022-08-13 Thread Antonio Quartulli
renamed remote_addrX variables to vpn_addrX to make it clear that they refer to the address over the VPN/tunnel Signed-off-by: Antonio Quartulli --- src/openvpn/dco.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/openvpn/dco.c b/src/openvpn/dco.c

[Openvpn-devel] [PATCH v101 4/7] dco-win: add documentation to README.dco.md

2022-08-13 Thread Antonio Quartulli
Signed-off-by: Arne Schwabe Signed-off-by: Lev Stipakov Signed-off-by: Antonio Quartulli --- Changes from v100: * add URL to windows installer (openvpn+dco) and modify text --- README.dco.md | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.dco.md

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
I stared at the code, tested with tap-windows6 with this commit and with dco driver with the latest commit in dco branch, works as expected. All my concerns are resolved. I am still not sure if it worth to split implementation into two parts - this commit introduces set of functions which are not

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

2022-08-13 Thread Arne Schwabe
This is allows querying the DCO status without doing an error-prone parsing of the startup log. Also remove comment that serves no purpose anymore. Signed-off-by: Arne Schwabe --- src/openvpn/multi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/openvpn/multi.c

[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 --server, >

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

2022-08-13 Thread Antonio Quartulli
On Windows the high level API should still use the link_socket object to read and write packets. For this reason, even if dco_installed is true, we still need to rely on the classic link_socket object. Signed-off-by: Antonio Quartulli --- Changes from v101: * add defined(TARGET_FREEBSD) to the

Re: [Openvpn-devel] [PATCH v100 07/10] dco-win: ensure the DCO API is not used when running on Windows

2022-08-13 Thread Gert Doering
Hi, On Fri, Aug 12, 2022 at 03:06:54PM +0200, Antonio Quartulli wrote: > On Windows the high level API should still use the link_socket object to > read and write packets. For this reason, even if dco_installed is true, > we still need to rely on the classic link_socket object. > >

[Openvpn-devel] [PATCH applied] Re: ovpn-dco: print some netlink messages to debug level

2022-08-13 Thread Gert Doering
Acked-by: Gert Doering As we discussed :-) - trivial enough. Without that patch: $ openvpn --verb 3 ... 2022-08-13 20:51:06 Cannot find ovpn_dco netlink component: Object not found 2022-08-13 20:51:06 Note: Kernel support for ovpn-dco missing, disabling data channel offload. 2022-08-13

[Openvpn-devel] [PATCH applied] Re: dco: move message to DCO debug level and reword a bit

2022-08-13 Thread Gert Doering
Acked-by: Gert Doering Indeed :-) - this message is fairly confusing on systems with multiple DCO-using OpenVPN instances, running with --verb 3 - for all new clients and client disconnects, there's noise in "other" instances, which looked quite scary. I haven't tested this (beyond a compile