[Openvpn-devel] [PATCH] [RFC] fix warning with gcc 12.2.0 (compiler bug?)

2022-11-27 Thread Arne Schwabe
Changing the argument of check_malloc_return from const void* to void* removes the warning from gcc 12.2.0: In file included from ../../../openvpn-git/src/openvpn/crypto_openssl.c:40: ../../../openvpn-git/src/openvpn/buffer.h: In function ‘hmac_ctx_new’: ../../../openvpn-git/src/openvpn/buffer.h:1

[Openvpn-devel] [PATCH v3 1/3] Use dedicated multi->dco_peer_id for DCO instead of multi->peer_id

2022-11-27 Thread Arne Schwabe
The lifetime and state machine of multi->peer_id does not exactly the lifetime/state of DCO. This is especially for p2p NCP where a reconnection can change the peer id. Also use this new field with value -1 to mean not installed, replacing the dco_peer_added field. Also ensure that we have a failu

[Openvpn-devel] [DRAFT]: packet counting for DCO

2022-11-27 Thread Kristof Provost via Openvpn-devel
Hi, Here's an initial draft for how I'd approach getting traffic statistics in DCO mode. Userspace doesn't see all of the traffic, so we need to ask the kernel too. I've added new variables for the kernel numbers so that we can keep the userspace numbers, for the control packets which go through

[Openvpn-devel] [PATCH] Read DCO traffic stats from the kernel

2022-11-27 Thread Kristof Provost via Openvpn-devel
From: Kristof Provost When DCO is active userspace doesn't see all of the traffic, so when we access these stats we must update them. Retrieve kernel statistics every time we access the link_(read|write)_bytes values. Introduce a dco_(read|write)_bytes so that we don't clobber the existing stat

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

2022-11-27 Thread Gert Doering
Hi, On Sun, Nov 27, 2022 at 12:18:45PM +0100, Kristof Provost via Openvpn-devel wrote: > From: Kristof Provost > > When DCO is active userspace doesn't see all of the traffic, so when we > access these stats we must update them. > > Retrieve kernel statistics every time we access the > link_(r

[Openvpn-devel] [PATCH] options: Always define options->management_flags

2022-11-27 Thread Frank Lichtenheld
That makes it possible to remove several preprocessor directives which is a good thing. The cost should be negligible. Signed-off-by: Frank Lichtenheld --- src/openvpn/manage.h | 41 +++--- src/openvpn/options.c | 46 +-- s

[Openvpn-devel] [PATCH] Add section about common error with OpenVPN 2.6 and OpenSSL 3.0

2022-11-27 Thread Arne Schwabe
We expect a number of configuration to no longer work with OpenVPN 2.6 and OpenSSL 3.0. This section tries to explain the most common errors that will come up and how to work around them. Signed-off-by: Arne Schwabe --- Changes.rst | 84 + 1 fi