[Openvpn-devel] [PATCH applied] Re: fix compilation issues with small and w/o debug

2022-06-21 Thread Gert Doering
I discussed the use of "%zu" and Windows/MinGW builds with Selva, who said this will work (it will create warnings, thus no -Werror builds, but since release builds are MSVC, this should be acceptable). Uncrustify said I have to add a newline before one of the #endif lines, so I did. Generally sp

[Openvpn-devel] [PATCH applied] Re: Update the replay-window backtrack log message

2022-06-21 Thread Gert Doering
Your patch has been applied to the master and release/2.5 branch (same mismatch between doc + code). commit 98cbd2914cb728bfaa6ce36a968e944555c57d53 (master) commit 70897fd139e84a64d6344bf6af28fe0b0b8087d3 (release/2.5) Author: Martin Jan? Date: Fri Jun 10 12:04:05 2022 + Update the re

[Openvpn-devel] [PATCH 4/6] Implement a function to calculate the default MTU

2022-06-21 Thread Arne Schwabe
We could also just hardcode this value to 1420 but this approach does not add much (complicated) code and it is a bit better than to have a magic number to just be there. Signed-off-by: Arne Schwabe --- src/openvpn/mtu.c | 22 ++ src/openvpn/mtu.h

[Openvpn-devel] [PATCH 5/6] Change default MTU in server mode to 1420 and push it to client

2022-06-21 Thread Arne Schwabe
This changes the default MTU of the tun-mtu to 1420 to avoid MTU related issues that are even more prominent when DCO server or clients are involved. To maximise compatibility to lie our MTU in the default OCC message and also push the real MTU to clients that support pushing the MTU. Signed-off-

[Openvpn-devel] [PATCH 3/6] Extract update_session_cipher into standalone function

2022-06-21 Thread Arne Schwabe
This allow the code later to check if the cipher is okay to use and update it for the calculation for the max MTU size. Signed-off-by: Arne Schwabe --- src/openvpn/ssl.c | 11 +-- src/openvpn/ssl_ncp.c | 22 ++ src/openvpn/ssl_ncp.h | 8 3 files changed,

[Openvpn-devel] [PATCH 2/6] Inline frame_add_to_extra_tun function and remove frame_defined

2022-06-21 Thread Arne Schwabe
This function has only one usage and is so trivial that an extra function makes little sense anymore. frame_defined is no longer used, so remove the function. Signed-off-by: Arne Schwabe --- src/openvpn/init.c | 2 +- src/openvpn/mtu.h | 16 2 files changed, 1 insertion(+), 1

[Openvpn-devel] [PATCH 6/6] Allow tun-mtu to be pushed

2022-06-21 Thread Arne Schwabe
This allows tun-mtu to pushed but only up to the size of the preallocated buffers. This is not a perfect solution but should allow most of the use cases where the mtu is close enough to 1500. Signed-off-by: Arne Schwabe --- Changes.rst | 8 doc/man-sections/cli

[Openvpn-devel] [PATCH 1/6] Remove leftover frame_set_mtu_dynamic definitions in mtu.h

2022-06-21 Thread Arne Schwabe
The frame_set_mtu_dynamic function and it defines were removed during the buffer rework but this definitions were overlooked. Signed-off-by: Arne Schwabe --- src/openvpn/mtu.h | 10 -- 1 file changed, 10 deletions(-) diff --git a/src/openvpn/mtu.h b/src/openvpn/mtu.h index 7f967e066..4b

[Openvpn-devel] [PATCH applied] Re: Remove leftover frame_set_mtu_dynamic definitions in mtu.h

2022-06-21 Thread Gert Doering
Acked-by: Gert Doering Trivial enough. Totally untested. Just verified with "git grep". Your patch has been applied to the master branch. commit e2df31b6835eb15af6524d67f6fd93ff7a3cc4dd Author: Arne Schwabe Date: Tue Jun 21 18:16:44 2022 +0200 Remove leftover frame_set_mtu_dynamic def

[Openvpn-devel] [PATCH applied] Re: Inline frame_add_to_extra_tun function and remove frame_defined

2022-06-21 Thread Gert Doering
Acked-by: Gert Doering Trivial enough. Only compile tested (+stare at code). Your patch has been applied to the master branch. commit 65c6308608e5a637564db0cf241a16501190342a Author: Arne Schwabe Date: Tue Jun 21 18:16:45 2022 +0200 Inline frame_add_to_extra_tun function and remove fra