Re: [Openvpn-devel] [PATCH master+release/2.5] error.c: use correct API to get error description on Windows

2022-02-22 Thread Lev Stipakov
Hi, > While this would be a cleaner fix, it also requires extensive changes and > it is not always easy to decide where to use M_ERRNO and where to use > M_WINERR. E.g., without looking into the internals of platform.c one > doesn't know whether platform_open() uses _wopen() or CreateFile(). > T

[Openvpn-devel] [PATCH v2] Fix --mtu-disc maybe|yes on Linux.

2022-02-22 Thread Gert Doering
--mtu-disc (on Linux) needs two components to work: - setsockopt() with IP_MTU_DISCOVER or IPV6_MTU_DISCOVER - "extended error reporting" (setsockopt(IP_RECVERR) and then via mtu.c/format_extended_socket_error()) to react on "packet too big" errors on sendto() / sendmsg() Some conf

Re: [Openvpn-devel] [PATCH v2] Fix --mtu-disc maybe|yes on Linux.

2022-02-22 Thread Arne Schwabe
Am 22.02.22 um 12:38 schrieb Gert Doering: --mtu-disc (on Linux) needs two components to work: - setsockopt() with IP_MTU_DISCOVER or IPV6_MTU_DISCOVER - "extended error reporting" (setsockopt(IP_RECVERR) and then via mtu.c/format_extended_socket_error()) to react on "packet t

[Openvpn-devel] [PATCH v2] doc: cleanup for --data-ciphers and related

2022-02-22 Thread Frank Lichtenheld
- Fix various formatting inconsistencies - Remove outdated (as of 2.6) information from --data-ciphers and instead add a link to cipher negotiation chapter. - Some drive-by fixes in related code comments and log messages as I was reading them. Cc: Arne Schwabe Signed-off-by: Frank Lichtenhe

Re: [Openvpn-devel] [PATCH v2] doc: cleanup for --data-ciphers and related

2022-02-22 Thread Arne Schwabe
The ``algorithm`` parameter may be :code:`lzo`, :code:`lz4`, @@ -193,6 +193,10 @@ configured in a compatible way between both the local and remote side. supported by the client will be pushed to clients that support cipher negotiation. + For more details see the chapter on `Dat

Re: [Openvpn-devel] [PATCH v2] doc: cleanup for --data-ciphers and related

2022-02-22 Thread Frank Lichtenheld
> Arne Schwabe hat am 22.02.2022 13:21 geschrieben: > > > > > > The ``algorithm`` parameter may be :code:`lzo`, :code:`lz4`, > > @@ -193,6 +193,10 @@ configured in a compatible way between both the local > > and remote side. > > supported by the client will be pushed to clients that

[Openvpn-devel] [PATCH applied] Re: Fix --mtu-disc maybe|yes on Linux.

2022-02-22 Thread Gert Doering
Patch has been applied to the master branch, backported to release/2.5 (leaving out the mss.c hunks, and the syshead.h one still has HAVE_IPVEC to remove...) and to release/2.4 (sys/poll.h in configure.ac). Verified that 2.5 and 2.4 show the right socket error message ("write UDPv4 [EMSGSIZE Pat

[Openvpn-devel] [PATCH DCO]: cleanups prior to FreeBSD DCO support

2022-02-22 Thread Kristof Provost via Openvpn-devel
Hi, As said in my e-mail (from k...@freebsd.org, Feb 17th), I'm working on adding DCO support for FreeBSD. I ran into a few minor issues that are not directly related, but should be addressed anyway. These patches are all against https://github.com/OpenVPN/ovpn-dco Best regards, Kristof

[Openvpn-devel] [PATCH 3/3] dco: Check for ipi_addr before using it

2022-02-22 Thread Kristof Provost via Openvpn-devel
From: Kristof Provost If IP_RECVDSTADDR exists we'll define ENABLE_IP_PKTINFO, but that doesn't actually mean we have struct in_pktinfo. We need to check HAVE_IN_PKTINFO for that. This fixes DCO builds on FreeBSD. Signed-off-by: Kristof Provost --- src/openvpn/dco.c | 2 +- 1 file changed, 1

[Openvpn-devel] [PATCH 2/3] open_tun_generic(): Do not consider open_tun_dco() returning 0 to be an error

2022-02-22 Thread Kristof Provost via Openvpn-devel
From: Kristof Provost It seems clear that the intent here is to special case the EEXIST error, not the consider anything else (i.e. 0) to also be an error. Signed-off-by: Kristof Provost --- src/openvpn/tun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvpn/tun.c

[Openvpn-devel] [PATCH 1/3] dco: dco_meesage_peer_id -> dco_message_peer_id

2022-02-22 Thread Kristof Provost via Openvpn-devel
From: Kristof Provost Fix typo in variable name. Signed-off-by: Kristof Provost --- src/openvpn/dco_linux.c | 6 +++--- src/openvpn/dco_linux.h | 2 +- src/openvpn/multi.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/openvpn/dco_linux.c b/src/openvpn/dco_l

[Openvpn-devel] [PATCH 2/3] open_tun_generic(): Do not consider open_tun_dco() returning 0 to be an error

2022-02-22 Thread Kristof Provost via Openvpn-devel
From: Kristof Provost It seems clear that the intent here is to special case the EEXIST error, not the consider anything else (i.e. 0) to also be an error. Signed-off-by: Kristof Provost --- src/openvpn/tun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvpn/tun.c

[Openvpn-devel] [PATCH 3/3] dco: Check for ipi_addr before using it

2022-02-22 Thread Kristof Provost via Openvpn-devel
From: Kristof Provost If IP_RECVDSTADDR exists we'll define ENABLE_IP_PKTINFO, but that doesn't actually mean we have struct in_pktinfo. We need to check HAVE_IN_PKTINFO for that. This fixes DCO builds on FreeBSD. Signed-off-by: Kristof Provost --- src/openvpn/dco.c | 2 +- 1 file changed, 1

[Openvpn-devel] [PATCH DCO]: cleanups prior to FreeBSD DCO support

2022-02-22 Thread Kristof Provost via Openvpn-devel
Hi, As said in my e-mail (from k...@freebsd.org, Feb 17th), I'm working on adding DCO support for FreeBSD. I ran into a few minor issues that are not directly related, but should be addressed anyway. These patches are all against https://github.com/OpenVPN/ovpn-dco Best regards, Kristof

[Openvpn-devel] [PATCH 1/3] dco: dco_meesage_peer_id -> dco_message_peer_id

2022-02-22 Thread Kristof Provost via Openvpn-devel
From: Kristof Provost Fix typo in variable name. Signed-off-by: Kristof Provost --- src/openvpn/dco_linux.c | 6 +++--- src/openvpn/dco_linux.h | 2 +- src/openvpn/multi.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/openvpn/dco_linux.c b/src/openvpn/dco_l

Re: [Openvpn-devel] [PATCH DCO]: cleanups prior to FreeBSD DCO support

2022-02-22 Thread Antonio Quartulli
Hi Kristof, On 22/02/2022 14:28, Kristof Provost via Openvpn-devel wrote: Hi, As said in my e-mail (from k...@freebsd.org, Feb 17th), I'm working on adding DCO support for FreeBSD. I ran into a few minor issues that are not directly related, but should be addressed anyway. These patches are al

[Openvpn-devel] [PATCH] Fix M_ERRNO behavior on Windows

2022-02-22 Thread Lev Stipakov
From: Lev Stipakov We use M_ERRNO flag in logging to display error code and error message. This has been broken on Windows, where we use error code from GetLastError() and error description from strerror(). strerror() expects C runtime error code, which is quite different from last error code fro

[Openvpn-devel] [PATCH] Implement --mtu-disc for IPv6 UDP sockets.

2022-02-22 Thread Gert Doering
Commit 4225114b96 repaired "--mtu-disc yes" brokenness for IPv4 UDP sockets (caused by autoconf/ifdef issues). This patch adds new functionality to do --mtu-disc for IPv6 sockets as well. Half of it (setsockopt(IPV6_MTU_DISCOVER)) was already there, but receiving of detailed socket errors was mis

[Openvpn-devel] [PATCH] networking: use OPENVPN_ETH_ALEN instead of ETH_ALEN

2022-02-22 Thread Antonio Quartulli
With the introduction of SITNL two occurrences of ETH_ALEN were introduced in the code. This define exists on Linux in the linux/if_ether.h header, however the latter is included in linux/if_tun.h which may or may not exist (depending on how old your system is). If the system lacks if_tun.h then t