[Openvpn-devel] [PATCH release/2.6] Allow certain DHCP options to be used without DHCP server

2023-02-07 Thread Lev Stipakov
From: Lev Stipakov Followin DHCP options: DOMAIN, ADAPTER_DOMAIN_SUFFIX, DNS, WINS don't require DHCP server in order to be used. This change allows those options to be used with dco and wintun drivers. If an option specified which requires DHCP server and tap-windows6 driver is not used, pr

Re: [Openvpn-devel] [PATCH 1/5] Windows: fix unused function setenv_foreign_option

2023-02-07 Thread Lev Stipakov
I haven't tested it in the MinGW environment, but checked the code in MSVC and ensured that setenv_foreign_option is indeed not used at all in Win32. Acked-by: Lev Stipakov pe 3. helmik. 2023 klo 21.15 Frank Lichtenheld (fr...@lichtenheld.com) kirjoitti: > > Signed-off-by: Frank Lichtenheld > -

Re: [Openvpn-devel] [PATCH 2/5] Windows: fix unused variables in delete_route_ipv6

2023-02-07 Thread Lev Stipakov
Looks good. Stared at the code and test-compiled with MSVC. Acked-by: Lev Stipakov pe 3. helmik. 2023 klo 21.15 Frank Lichtenheld (fr...@lichtenheld.com) kirjoitti: > > At this point it might be easier to create a > dedicated function for Windows... > > Signed-off-by: Frank Lichtenheld > --- >

[Openvpn-devel] [PATCH v2 release/2.6] Allow certain DHCP options to be used without DHCP server

2023-02-07 Thread Lev Stipakov
From: Lev Stipakov Followin DHCP options: DOMAIN, ADAPTER_DOMAIN_SUFFIX, DNS, WINS don't require DHCP server in order to be used. This change allows those options to be used with dco and wintun drivers. If an option specified which requires DHCP server and tap-windows6 driver is not used, pr

Re: [Openvpn-devel] [PATCH v2 2/3] Build unit tests in mingw Windows build

2023-02-07 Thread Arne Schwabe
Am 04.02.23 um 07:40 schrieb selva.n...@gmail.com: From: Selva Nair - Minor changes to the build system to include some dependencies for Windows build - test_tls_crypt not built as it will pull in win32.c and its dependencies - If cross-compiling, "make check" will only build the tests

[Openvpn-devel] [PATCH v3] configure: enable DCO by default on FreeBSD/Linux

2023-02-07 Thread Frank Lichtenheld
Automatically disabled when - iproute2 is enabled (Don't want to force people specifying --disable-dco explicitely) - libnv is missing on FreeBSD (FreeBSD version too old anyway) Will still error out if libnl-genl is missing on Linux to make people aware of the new dependency. Signed-off-by:

Re: [Openvpn-devel] [PATCH 4/5] Windows: fix unused variable in win32_get_arch

2023-02-07 Thread Lev Stipakov
Clear enough. Acked-by: Lev Stipakov pe 3. helmik. 2023 klo 21.15 Frank Lichtenheld (fr...@lichtenheld.com) kirjoitti: > > Signed-off-by: Frank Lichtenheld > --- > src/openvpn/win32.c | 7 +++ > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/src/openvpn/win32.c b/src/open

Re: [Openvpn-devel] [PATCH v2 release/2.6] Allow certain DHCP options to be used without DHCP server

2023-02-07 Thread Antonio Quartulli
Hi, On 07/02/2023 10:42, Lev Stipakov wrote: From: Lev Stipakov Followin DHCP options: DOMAIN, ADAPTER_DOMAIN_SUFFIX, DNS, WINS don't require DHCP server in order to be used. This change allows those options to be used with dco and wintun drivers. If an option specified which requires DH

[Openvpn-devel] [PATCH v2 3/5] Windows: fix wrong printf format in x_check_status

2023-02-07 Thread Frank Lichtenheld
Relevant defines/typedefs: typedef UINT_PTRSOCKET; if defined(_WIN64) typedef unsigned __int64 UINT_PTR; else typedef unsigned int UINT_PTR; endif ifdef _WIN64 define PRIuPTR PRIu64 else define PRIuPTR PRIu32 endif Remove duplicated include of inttypes.h Signed-off-by: Frank Lichten

Re: [Openvpn-devel] [PATCH v2 release/2.6] Allow certain DHCP options to be used without DHCP server

2023-02-07 Thread Lev Stipakov
This definition seems to be unused by the way :) I am not sure if "0x0003" is better than "3" (we have only two flags). Something like 0011b would be clearer, but we don't have SHOW_BINARY. ti 7. helmik. 2023 klo 15.36 Antonio Quartulli (a...@unstable.cc) kirjoitti: > > Hi, > > On 07/02/2

Re: [Openvpn-devel] [PATCH v2 release/2.6] Allow certain DHCP options to be used without DHCP server

2023-02-07 Thread Antonio Quartulli
Hi, On 07/02/2023 14:59, Lev Stipakov wrote: This definition seems to be unused by the way :) I am not sure if "0x0003" is better than "3" (we have only two flags). Something like 0011b would be clearer, but we don't have SHOW_BINARY. Personally I find the hex representation better wh

[Openvpn-devel] [PATCH v3 release/2.6] Allow certain DHCP options to be used without DHCP server

2023-02-07 Thread Lev Stipakov
From: Lev Stipakov Followin DHCP options: DOMAIN, ADAPTER_DOMAIN_SUFFIX, DNS, WINS don't require DHCP server in order to be used. This change allows those options to be used with dco and wintun drivers. If an option specified which requires DHCP server and tap-windows6 driver is not used, pr

Re: [Openvpn-devel] [PATCH v2 3/5] Windows: fix wrong printf format in x_check_status

2023-02-07 Thread Lev Stipakov
Looks good, looked at the code test-compiled in MSVC. Acked-by: Lev Stipakov ti 7. helmik. 2023 klo 15.44 Frank Lichtenheld (fr...@lichtenheld.com) kirjoitti: > > Relevant defines/typedefs: > typedef UINT_PTRSOCKET; > if defined(_WIN64) > typedef unsigned __int64 UINT_PTR; > else > typ

[Openvpn-devel] [PATCH applied] Re: Windows: fix unused function setenv_foreign_option

2023-02-07 Thread Gert Doering
Tested on plain linux (which needs setenv_foreign_option) and MingW (which no longer warns) compile. Trivial enough. Your patch has been applied to the master and release/2.6 branch. commit 8aeec3aa36873489d3e708ae694c57e59b4302ef (master) commit b9d35055eae676790f3bc214c00a01f756b0cd55 (releas

[Openvpn-devel] [PATCH applied] Re: Windows: fix unused variables in delete_route_ipv6

2023-02-07 Thread Gert Doering
Test compiled on mingw & linux, and pushed to the buildbots. This is the sort of cross-platform patch that looks harmless and breaks somewhere :-) (but it didn't). We normally try to avoid refactoring in the middle of a release branch, but "we're between .0 and .1, and it's very trivial code move

[Openvpn-devel] [PATCH applied] Re: Windows: fix wrong printf format in x_check_status

2023-02-07 Thread Gert Doering
Test built on MinGW and Linux. Haven't actually tried to trigger an error message which would contain a fd=nnn output, but for "non windows" this is a no-op change, and "for windows" it looks correct. Your patch has been applied to the master and release/2.6 branch. commit a95705be85cb1d3a5868ef

[Openvpn-devel] [PATCH applied] Re: Windows: fix unused variable in win32_get_arch

2023-02-07 Thread Gert Doering
"Clear enough", indeed. Test compiled on MinGW. Your patch has been applied to the master and release/2.6 branch. commit 2dc2d16559b41d56f662d7cd69ea547e804e27b8 (master) commit 4718af50bb7b5a913ae4befb2d3a8dd338b3eb74 (release/2.6) Author: Frank Lichtenheld Date: Fri Feb 3 20:14:39 2023 +0100

Re: [Openvpn-devel] [PATCH v3] Get rid of unused 'bool tuntap_buffer' arguments.

2023-02-07 Thread Arne Schwabe
Am 01.02.23 um 15:15 schrieb Gert Doering: overlapped_io_init() has a "bool tuntap_buffer" argument which is only passed onwards to alloc_buf_sock_tun(), which does nothing with it. Remove from both functions. v2: move alloc_buf_sock_tun() to win32.c v3: leave alloc_buf_sock_tun() where

Re: [Openvpn-devel] [PATCH v3] configure: enable DCO by default on FreeBSD/Linux

2023-02-07 Thread Selva Nair
On Tue, Feb 7, 2023 at 8:22 AM Frank Lichtenheld wrote: > Automatically disabled when > - iproute2 is enabled > (Don't want to force people specifying --disable-dco explicitely) > - libnv is missing on FreeBSD > (FreeBSD version too old anyway) > > Will still error out if libnl-genl is missin

Re: [Openvpn-devel] [PATCH v2 2/3] Build unit tests in mingw Windows build

2023-02-07 Thread Selva Nair
Hi, On Tue, Feb 7, 2023 at 6:59 AM Arne Schwabe wrote: > Am 04.02.23 um 07:40 schrieb selva.n...@gmail.com: > > From: Selva Nair > > > > - Minor changes to the build system to include some > >dependencies for Windows build > > > > - test_tls_crypt not built as it will pull in win32.c and >

Re: [Openvpn-devel] [PATCH v3 release/2.6] Allow certain DHCP options to be used without DHCP server

2023-02-07 Thread Antonio Quartulli
Hi, On 07/02/2023 15:54, Lev Stipakov wrote: From: Lev Stipakov Followin DHCP options: DOMAIN, ADAPTER_DOMAIN_SUFFIX, DNS, WINS don't require DHCP server in order to be used. This change allows those options to be used with dco and wintun drivers. If an option specified which requires DH

Re: [Openvpn-devel] [PATCH v3] configure: enable DCO by default on FreeBSD/Linux

2023-02-07 Thread Antonio Quartulli
Hi, On 07/02/2023 14:20, Frank Lichtenheld wrote: Automatically disabled when - iproute2 is enabled (Don't want to force people specifying --disable-dco explicitely) - libnv is missing on FreeBSD (FreeBSD version too old anyway) Will still error out if libnl-genl is missing on Linux to ma

[Openvpn-devel] [PATCH v2 2/5] Build unit tests in mingw Windows build

2023-02-07 Thread Arne Schwabe
From: Selva Nair - Minor changes to the build system to include some dependencies for Windows build - test_tls_crypt not built as it will pull in win32.c and its dependencies - If cross-compiling, "make check" will only build the tests but not run any. Copy to Windows and run manually. Ex

[Openvpn-devel] [PATCH 3/5] Do not run check_engine test when crosscompiling

2023-02-07 Thread Arne Schwabe
Signed-off-by: Arne Schwabe --- tests/unit_tests/engine-key/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/unit_tests/engine-key/Makefile.am b/tests/unit_tests/engine-key/Makefile.am index 246222514..0c2888576 100644 --- a/tests/unit_tests/engine-key/Makefile.am +++ b/te

[Openvpn-devel] [PATCH 4/5] Add missing stdint.h includes in unit tests files

2023-02-07 Thread Arne Schwabe
My mingw compiler/headers (mingw-w64 10.0.0 on macOS) seem to be more pendantic than the one that comes with Ubuntu 22.04 (github actions) or any of the other platforms including msvc/normal windows header. Signed-off-by: Arne Schwabe --- tests/unit_tests/example_test/test.c | 1 + tests/unit_t

[Openvpn-devel] [PATCH 1/5] Conditionally add subdir-objects option to automake

2023-02-07 Thread Arne Schwabe
From: Selva Nair - Eliminates repeated warnings such as warning: source file '$(openvpn_srcdir)/env_set.c' is in a subdirectory, but option 'subdir-objects' is disabled - Enabled only for automake >= 1.16 as older versions have a buggy implementation of this option Main side effect of thi

[Openvpn-devel] [PATCH 0/5] Build and run unittests with mingw in Github actions

2023-02-07 Thread Arne Schwabe
This patch also includes the previous patches from Sevla to make the dependency from these patches clear. Patch 0/3 can be squashed into 2/5 as it is only a minor fixup of that patch. The Github actions could probably made a little bit nicer, eg by static compiling and requiring copying less dll

[Openvpn-devel] [PATCH 5/5] Add building and running mingw unittests to github actions

2023-02-07 Thread Arne Schwabe
Signed-off-by: Arne Schwabe --- .github/workflows/build.yaml | 110 ++- 1 file changed, 108 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 132624547..c71bd2c4d 100644 --- a/.github/workflows/build.yaml

Re: [Openvpn-devel] [PATCH v2 3/3] Add a unit test for functions in cryptoapi.c

2023-02-07 Thread Arne Schwabe
Am 04.02.23 um 07:40 schrieb selva.n...@gmail.com: From: Selva Nair - Though named cryptoapi_testdriver, right now this only tests parsing of thumbprint specified as a selector for --cryptioapicert option. More tests coming.. v2: a line that belongs here was mistakenly included in the pr

Re: [Openvpn-devel] [PATCH 1/5] Conditionally add subdir-objects option to automake

2023-02-07 Thread Selva Nair
On Tue, Feb 7, 2023 at 7:18 PM Arne Schwabe wrote: > From: Selva Nair > > - Eliminates repeated warnings such as > warning: source file '$(openvpn_srcdir)/env_set.c' is in a subdirectory, > but option 'subdir-objects' is disabled > - Enabled only for automake >= 1.16 as older versions have a

[Openvpn-devel] [PATCH v3 2/3] Build unit tests in mingw Windows build

2023-02-07 Thread selva . nair
From: Selva Nair - Minor changes to the build system to include some dependencies for Windows build - test_tls_crypt not built as it will pull in win32.c and its dependencies - If cross-compiling, "make check" will only build the tests but not run any. Copy to Windows and run manually. Ex

Re: [Openvpn-devel] [PATCH v2 3/3] Add a unit test for functions in cryptoapi.c

2023-02-07 Thread Selva Nair
Hi, On Tue, Feb 7, 2023 at 7:18 PM Arne Schwabe wrote: > Am 04.02.23 um 07:40 schrieb selva.n...@gmail.com: > > From: Selva Nair > > > > - Though named cryptoapi_testdriver, right now this only tests > >parsing of thumbprint specified as a selector for --cryptioapicert > >option. More t